Reputation: 6188
I have an SQLite DB with date, month, year fields in integers (I believe they should have used a date field but the choice wasn't mine). I would like to select the row whose date value is the latest. What is the best query to do that?
Upvotes: 0
Views: 38
Reputation: 204894
select * from your_table
order by year, month, `date` desc
limit 1
Upvotes: 1