Reputation: 11
I've a table with primary id and timestamp fields and there are many rows with different timestamps. I want to retrieve the row for which the latest timestamp is there for a specific id. The timestamp is in UNIX timestamp format. How do I retrieve that specific row?
Upvotes: 0
Views: 33
Reputation: 6158
Try using this:
select * from table where id=1 order by timestamp_field desc;
Upvotes: 0