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?
Thanks.
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?
Thanks.
I am not sure I understand what you are after.
When you pull distinct values, there is (by definition) one of each unique value.
Can you rephrase what you are trying to do?
UPDATE
After reading another solution, I think I see what you are after.
Using SELECT COUNT(*) as given in the solution by Rufinus should do the trick.