Hi, which companies have operated more than one flight?
select * from operate_company as t1 join flight as t2 on t1.id = t2.company_id group by t1.id having count ( * ) > 1
Great, can you show me the top 3 companies that have operated the most flights?
select * from operate_company as t1 join flight as t2 on t1.id = t2.company_id group by t1.id order by count ( * ) limit 3
Which type of principal activity, cargo airline or airline, operates the most flights?
select principal_activities from operate_company as t1 join flight as t2 on t1.id = t2.company_id group by principal_activities order by count ( * ) limit 1
What are the top 3 companies operating the most cargo flights?
select * from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t1.principal_activities = "Cargo" group by t1.name order by count ( * ) limit 3