How many car makers are there in each continents? List the continent name and the count.
CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR)
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
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR) Question: How many car makers are there in each continents? List the continent name and the count. [/INST] 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 </s>