There is a clear answer how to select top 1:
select * from table_name where rownum = 1
and how to order by date in descending order:
select * from table_name order by trans_date desc
but they does not work togeather (rownum
is not generated according to trans_date
):
... where rownum = 1 order by trans_date desc
The question is how to select top 1 also ordered by date?