How to list the 10 most repeated lines?

I want to get the 10 most duplicate rows from the following table:

Table Name: votes(id,vote) -------------------------- 1 | Taylor Swift 2 | Maroon5 3 | Maroon5 4 | Maroon5 5 | Taylor Swift 6 | Kanye West 

The result should be something like:

 1. Maroon5: 3 votes 2. Taylor Swift: 2 votes 3. Kanye West: 1 votes 

How to do this using only MySQL (if possible)

thanks

+4
source share
2 answers
 select vote, count(*) from votes group by 1 order by 2 desc limit 10 
+8
source
 select vote,count(vote) from votes group by vote order by count(vote) desc limit 10 
+1
source

All Articles