Show me the names of all the pilots
select pilot from flight
Which of these pilots flied for a company that runs 'Cargo' activities?
select * from flight as t1 join operate_company as t2 on t1.company_id = t2.id where principal_activities = 'Cargo'
Which pilots flied for a company that runs 'Catering services' activities?
select * from flight as t1 join operate_company as t2 on t1.company_id = t2.id where principal_activities = 'Catering services'
Which pilots flied for companies that ran both of those activities?
select t2.pilot from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t1.principal_activities = 'Cargo' intersect select t2.pilot from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t1.principal_activities = 'Catering services'