I would like to remove the duplicate records based on columns ID and VAL but keep the max SAL records. ID + VAL is the key in the table and just delete same records by keeping the max sal.
Note: Eventhough there are two records for the same max SAL, just keep one
eg
SQL> select * from temp_fa;
ID VAL SAL
---------- ---------- ----------
1 100 10
1 100 20
1 100 20
2 200 10
3 300 10
3 300 30
4 400 10
4 400 10
5 500 10
5 500 20
5 500 20
After deleting the table should looks like
SQL> select * from temp_fa;
ID VAL SAL
---------- ---------- ----------
1 100 20
2 200 10
3 300 30
4 400 10
5 500 20