I have a cars database which includes the following columns
Make
Model
I want to query how many cars of how of each make and then how many of each model.
So for example
Honda: 23
Fit: 10
Accord: 10
Civic: 3
BMW: 13
3 Series: 10
i8: 3
I can do it, I have this for my make, which shows results for Honda and BMW correctly but I also want to list the count of each model.
SELECT `type`, `variant`, COUNT(`variant`) as TTL FROM `fleet` WHERE `exited` IS NULL GROUP BY `variant`, `type`