Question: How many car makers are there in each continents? List the continent name and the count.
Schema: create table countries (continent varchar, countryid varchar, PRIMARY KEY (continent)); create table continents (continent varchar, contid varchar, PRIMARY KEY (continent)); create table car_makers (country varchar, PRIMARY KEY (country))
SQL: select t1.continent, count(*) from continents as t1 join countries as t2 on t1.contid = t2.continent join car_makers as t3 on t2.countryid = t3.country group by t1.continent