Hi Himanshu,
I am not 100% sure of this but I THINK that if you create a query in Aware IM and create the query you want (i.e select BO RegularUser and under the WHERE conditions you type in the conditions you want e.g. RegularUser.LoginName = LoggedInSystemUser.LoginName), you can see the SQL query from the Aware IM query.
If you look at the "Rule tab" of your newly created query you will see the following "rule":
FIND RegularUser WHERE RegularUser.LoginName='LoggedInSystemUser.LoginName'
If you look at the "SQL" tab of your newly created query you will see the following SQL query:
SELECT RegularUser.* FROM CRM_REGULARUSER AS RegularUser WHERE (RegularUser.LoginName='LoggedInSystemUser.LoginName')
PS: I am a SQL novice and can“t tell you if the SQL query is correct and if this will work but i think it will. Other developers that know or have tried this please chip in.