Suppose I have a table, like so:
UserID Meh Meh //meh is some column
````````````````````
01 ... ...
01 ... ...
03 ... ...
05 ... ...
05 ... ...
01 ... ...
03 ... ...
So I want to count how many times each userid appears in this table. I am doing this now:
select UserId from NinjaTable group by UserId
but its giving me something that I dont know or understand.
I want the result to be like so:
UserID Frequency
```````````````````
01 3
03 2
05 2
you are almost there.
You are grouping correctly, just add the count to select clause.
that should do it really.
edit: thanks to @abe for pointing the order.