SQL query for selecting most recent entries
- by Mr_Skid_Marks
A table in my database has a column, DATE_ADDED (stored in seconds). I want to extract all rows with the most recent date (aka largest value for DATE_ADDED).
The only solution I have come up with is to SELECT all the rows in ASC (ascending) order, grab the last entry from the table, check the date on this, and perform another SELECT on the table but this time only for the discovered DATE_ADDED.
Is it possibly to simplify this series of queries into a single one? My thought is I should be able to do a SELECT on all of the largest values in the table, but I am struggling to come up with a proper query.