Hello,
I have a query and I want to retrieve the last 10 rows instead of the first 10 rows.
I know that the typical way is to just switch the order that you sort on.
But, I need the bottom 10 rows in a certain order.
Basic query is:
SELECT MAX(RecordID), Description, URL
FROM tblActivity
where UserID = X
Group by Description, URL
Order BY RecordID
This shows all of the rows in tblActivity for user X (with duplicates removed using MAX)
But, I only want to see the 10 most recent results in order from earliest to latest.
If I change it to "Select TOP 10..." and "Order By RecordID DESC", then I cut it to 10 rows, BUT the order goes from top to bottom, which I don't want.
Any thoughts?
Thanks in advance,
Steve
Start Free Trial