How many airports are there?
select count ( * ) from airport
How many total companies are there?
select count ( * ) from operate_company
I would like the results by airport id, please.
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
How many airports are in the United States?
select count ( * ) from airport where country = "United States"
How many companies operate in airports in the United States?
select count ( distinct t1.id ) 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 where t3.country = "United States"