mysql Count the Distinct example
like:
ari
ari
dani
ari
I want select like this:
ari 3
dani 1
SELECT my_column,
COUNT(*) AS num
FROM my_table
GROUP BY my_column
ORDER BY COUNT(*) DESC
thanks stack overflow
ari
ari
dani
ari
I want select like this:
ari 3
dani 1
SELECT my_column,
COUNT(*) AS num
FROM my_table
GROUP BY my_column
ORDER BY COUNT(*) DESC
thanks stack overflow
Comments
Post a Comment