Count unique values of one column

from the Artful Common Queries page


SELECT col_name, COUNT(*) AS frequency 
FROM tbl_name
GROUP by col_name
ORDER BY frequency DESC;

Return to the Artful Common Queries page