Quantos países têm mais de 2 fabricantes de carros ?
CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR)
SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2