human
Schema:
airport (id, City, Country, IATA, ICAO, name)
operate_company (id, name, Type, Principal_activities, Incorporated_in, Group_Equity_Shareholding)
flight (id, Vehicle_Flight_number, Date, Pilot, Velocity, Altitude, airport_id, company_id)
Please answer with SQL.
assistant
Sure, I understand.
human
How many airports has pilot Thompson driven an aircraft?
assistant
SELECT COUNT( * ) FROM airport WHERE id IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );
human
How many airports had Thompson driven by August 1963?
assistant
SELECT COUNT( * ) FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T2.pilot = 'Thompson' AND T2.date > 'August 16, 1963';
human
What is the flight number of the aircraft Thompson drove in March 1, 1963
assistant
SELECT Vehicle_Flight_number FROM flight WHERE pilot = "Thompson" AND date = "March 1, 1963" ;