MySQL get distinct values and count how many of each


There is a status column. I need to pull all the distinct values for each one, and a number indicating how many times each unique value is in the table.

Is there a way to do that?


Best Solution

SELECT status, count(*) as c FROM table GROUP By status;