You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.
SCHEMA:
CREATE TABLE airport (id VARCHAR); CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (id VARCHAR)
system
How many companies operates airlines in each airport?
user
SELECT T3.id, COUNT(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id
assistant
<|im_start|>system
You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.
SCHEMA:
CREATE TABLE airport (id VARCHAR); CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (id VARCHAR)<|im_end|>
<|im_start|>user
How many companies operates airlines in each airport?<|im_end|>
