I have a data set asking a customer how many pets they have for example. Is there a way with one query I can count the distinct values (1,2,3, etc)? Thanks!
+----------+------+
| Customer | Pets |
+----------+------+
| 20 | 2 |
| 21 | 3 |
| 22 | 3 |
| 23 | 2 |
| 24 | 4 |
+----------+------+
What I want is a list saying:
- 2 had 2 Pets
- 2 had 3 Pets
- 1 had 4 Pets