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

Comments

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem