I have the data below, and i want to get the last row per desc
the result should be like this:
how can i do it in SQL, please note that database is oracle.
Advertisement
Answer
You can get the expected result with the following query:
select * from tbl1 where id1 in (select max(id1) from tbl1 group by desc1);