SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 3 UNION SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country JOIN model_list AS t3 ON t2.id = t3.maker WHERE t3.model = 'fiat'
Apa saja ID dan nama semua negara yang memiliki lebih dari 3 pembuat mobil atau menghasilkan model fiat?
CREATE TABLE model_list (maker VARCHAR, model VARCHAR); CREATE TABLE countries (countryid VARCHAR, countryname VARCHAR); CREATE TABLE car_makers (country VARCHAR, id VARCHAR)