I have a dataset in a table Trans. Which contains several transactions transno. I need to get the latest transaction record for each transno. This data is stored in an Oracle database.

I tried the following query, with slight changes each time. But I give only one raw material. This table contains more than 1 m records.
select * from (select transid,transno,transdate,transtype
from trans order by TRANSID desc) where rownum <= 1
Please help us with this.
source
share