Reputation: 2473
I have a MySQL table which looks like this -
I now want to retrieve top 10 athleteName
based on the time
. I know I can use top
clause, but that returns the entries based on the top 10 ids. How can I retrieve the entries based on the time
. I want to get the athletes with top 10 record times.
What is the correct SQL statement for this?
Upvotes: 0
Views: 77
Reputation: 37243
try this
select max(`time`) ,atheletename from table order by atheletename limit 10 DESC
Upvotes: 0