Hi Raja,
If you have access to RSRT T-code in BW system, just get into that and execute the Query with Debug option( Select Display SQL Query).You can see the SQL statement generated by query in RSRT transaction by enabling SQL query display option.
Hope this helps.
Thanks,
Vengal.