I have a table that looks something like this when ordered:
Row | Value |
---|---|
1 | -1 |
2 | -1 |
3 | -2 |
4 | -5 |
5 | -6 |
6 | -10 |
7 | -10 |
8 | -12 |
... | ... |
I want to create a count for each value but add a zero Count to Values that dont exist. My result should look like this:
Value | Count |
---|---|
-1 | 2 |
-2 | 1 |
-3 | 0 |
-4 | 0 |
-5 | 1 |
-6 | 1 |
-7 | 0 |
-8 | 0 |
-9 | 0 |
-10 | 2 |
-11 | 0 |
-12 | 1 |
How would I accomplish this?
CodePudding user response: