SELECT col_name, COUNT(*) AS frequency
FROM tbl_name
GROUP by col_name
ORDER BY frequency DESC;Count Unique Values of one Column
In this query how to count unique values of one column
In this query how to count unique values of one column
SELECT col_name, COUNT(*) AS frequency
FROM tbl_name
GROUP by col_name
ORDER BY frequency DESC;Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · Databases & DBAFundamentals of DBMS (Database Management Systems)Download nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
SubashPosted Sep 19, 2016, 4:48 AM EDT
Good