I have a table INVENTORY
that has among other columns CATEGORY
and UPDATED
.
Sorting the table by these columns is easy:
SELECT * FROM INVENTORY ORDER BY CATEGORY ASC, UPDATED ASC
What I want is to get a result set that contains only the first 4 rows from each category. Any idea how to get it done?