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!
SELECT CUSTOMER, COUNT(*) as PETS FROM table_name GROUP BY CUSTOMER;