On your third note of above reply i.e.
Fetch the record details of the profile.
I am able to fetch the details of single profile using select query but when I try to delete a profile using delete query
It is throwing an error (ErrorCode: 42601 Syntax error encountered. Reason: [Invalid command!])