SELECT col, count(*)
FROM tablethingie
GROUP BY col
ORDER BY count(*) DESC
LIMIT 10
More Related Contents:
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- How can I make SQL case sensitive string comparison on MySQL?
- Library not loaded: libmysqlclient.16.dylib error when trying to run ‘rails server’ on OS X 10.6 with mysql2 gem
- Count the occurrences of DISTINCT values
- Codeigniter – multiple database connections
- Column count doesn’t match value count at row 1
- How to search JSON data in MySQL?
- MySQL > Table doesn’t exist. But it does (or it should)
- INSERT INTO … SELECT FROM … ON DUPLICATE KEY UPDATE
- How do I modify a MySQL column to allow NULL?
- Connect to mysql in a docker container from the host
- Set NOW() as Default Value for datetime datatype?
- MySQL update CASE WHEN/THEN/ELSE [duplicate]
- SQL DELETE with JOIN another table for WHERE condition
- How to connect to a MySQL Data Source in Visual Studio
- Error Dropping Database (Can’t rmdir ‘.test\’, errno: 17)
- MySQL: #1075 – Incorrect table definition; autoincrement vs another key?
- mysql update query with sub query
- How can I implement single table inheritance using Laravel’s Eloquent?
- Converting SELECT DISTINCT ON queries from Postgresql to MySQL
- Integrity constraint violation: 1452 Cannot add or update a child row:
- How to change the mysql root password
- How can I set autoincrement format to 0001 in MySQL?
- Why MYSQL IN keyword not considering NULL values
- MySQL. Can’t create table errno 150
- What’s mysql’s “BETWEEN” performance over..?
- MySQL: set field default value to other column
- CREATE command denied to user?
- Deleting a row based on the max value
- MySQL giving “read ECONNRESET” error after idle time on node.js server