MySQL: select maximum year value from my table?
This is my table:
ID Value Year
10 Singapore 2010
10 Malaysia 2009
10 India 2008
Now 开发者_StackOverflowI want to retrieve maximum year record only.
Example:
ID value year
10 Singapore 2010
How can I write query in MySQL?
select * from tbl order by year desc limit 1
assuming year is unique
精彩评论