Re: I need only Unique records at the end of the Query.
To identify the rows you can have this approach.
SELECT [the number columns or column based on which u want to identify the duplicates] ,COUNT(*) FROM [whatever is your table] GROUP BY 1,2,3,......[as the case may be based on columns selected above] After identifying change the select to delete and check.
If the idea is to eliminate duplicates just used fastload. That is more effective.