count top 10 most occuring values in a column in mysql

SELECT col, count(*)
    FROM tablethingie
    GROUP BY col
    ORDER BY count(*) DESC
    LIMIT 10

Leave a Comment