I believe this will be an extremely simple question. So simple that I am going to be embarrassed. Regardless, I have been trying to figure this out for a while so I'm at my wits end. Here is the scenario using car manufacturers (ie Toyota) and car models (ie Prius, Sienna).
SELECT * FROM car_manufacturer man
INNER JOIN car_model cm ON cm.manufacturerid = man.manufacturerid
Simple, right?
Now I'd like to return a row for each manufacturer that has some Boolean set to true (Lets say car_manufacturer.is_awesome) AND makes more than one model.
I'm trying to use a sub query with select count(*) but can't figure this one out.
Please help!