SELECT word, COUNT(*) word_cnt
FROM your_table
GROUP BY word
ORDER BY COUNT(*) DESC
LIMIT 10
Groups GROUP BYby values word, ORDER BY COUNT(*) DESCfirst get the rows with the highest number, and LIMIT 10returns only the first 10 rows.
source
share