SQL provides the expected result but OQL provides random results

I need list of data from the database to find group duplicates. I have written SQL query and got result from postgres It provides me the expected result. When I try this is OQL, unable to execute as a single query. First I wrote sub query , executed and stored in a table.   Then wrote the join query to get the expected data   But once after execution of this OQL query , am getting random results from database not the expected one. Please let me know, is there anything I missed or wrong query.    Regards  
0 answers