Hi Friends
Please help me. Please check the below tables.
I have filtered the duplicate rows using the following query.
Select * from (Select b.*, ROW_NUMBER() OVER (PARTITION BY RI ORDER BY TT Desc) as num FROM TABLE b where TT='U' or TT='S') tbl where num=1;
I can able to do if the RI has duplicate rows and can filter one row with 'U' or 'S'. But i have to remove complete duplicate rows with TT as 'S' and the duplicate rows which are having 'U' and 'S' combination, need to get row with 'U' only and all other single RI values need to display as it is. I hope it is clear. If not please check the below tables. Kindly help me as i am not much aware of Oracle Sql queries. Thanking you in advance.
Input:
Result:
