1sf/bird-sql-train-with-schema huggingface dataset:
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: List the tail numbers of all the aircraft that arrived on time at Meadows Field airport in August of 2018?
Evidence: tail number refers to TAIL_NUM; arrived on time refers to ARR_DELAY < = 0; Meadows Field airport refers to Description = 'Bakersfield, CA: Meadows Field'; in August of 2018 refers to FL_DATE like '2018/8%';
SQL: SELECT T2.TAIL_NUM FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE LIKE '2018/8%' AND T1.Description = 'Bakersfield, CA: Meadows Field' AND T2.DEST = 'BFL' AND T2.ARR_DELAY <= 0 GROUP BY T2.TAIL_NUM
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Among the airports whose destination is Logan International, what is the airline id of the carrier operator with the highest delay in minutes due to security?
Evidence: destination refers to DEST; Logan International refers to Description = 'Boston, MA: Logan International'; airline id of the carrier operator refers to OP_CARRIER_AIRLINE_ID; highest delay in minutes due to security refers to MAX(SECURITY_DELAY);
SQL: SELECT T2.OP_CARRIER_AIRLINE_ID FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T1.Description = 'Boston, MA: Logan International' AND T2.DEST = 'BOS' ORDER BY T2.SECURITY_DELAY DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What are the names of the top 5 airlines with the highest number of aircraft?
Evidence: names of the airlines refers to Description; highest number of aircraft refers to MAX(COUNT(TAIL_NUM));
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code GROUP BY T2.Description ORDER BY T1.TAIL_NUM DESC LIMIT 5
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the name of the airline with the highest number of non-cancelled flights?
Evidence: names of the airlines refers to Description; highest number of non-cancelled flights refers to MAX(COUNT(CANCELLED = 0));
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.CANCELLED = 0 GROUP BY T2.Description ORDER BY COUNT(T1.CANCELLED) DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Give the name of the airline to which tail number N202NN belongs to.
Evidence: name of the airline refers to Description; tail number refers to TAIL_NUM; TAIL_NUM = 'N202NN';
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.TAIL_NUM = 'N202NN' GROUP BY T2.Description
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the name of the airline that flew the most flights to Chicago Midway International?
Evidence: name of the airline refers to Description; flights to refers to DEST; Chicago Midway International refers to Description = 'Chicago, IL: Chicago Midway International'; most flights to Chicago Midway International refers to MAX(COUNT(DEST WHERE Description = 'Chicago, IL: Chicago Midway International'));
SQL: SELECT T3.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T1.Description = 'Chicago, IL: Chicago Midway International' AND T2.DEST = 'MDW' GROUP BY T3.Description ORDER BY COUNT(T3.Description) DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the tail number of a Compass Airline's plane that flew the most number of flights from LAX to ABQ?
Evidence: tail number refers to TAIL_NUM; Compass Airline refers to Description = 'Compass Airlines: CP'; flew the most number of lights from LAX TO ABQ refers to MAX(COUNT(OP_CARRIER_AIRLINE_ID WHERE ORIGIN = 'LAX' and DEST = 'ABQ')); from LAX refers to ORIGIN = 'LAX'; to ABQ refers to DEST = 'ABQ';
SQL: SELECT T2.OP_CARRIER_AIRLINE_ID FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Compass Airlines: CP' AND T2.ORIGIN = 'LAX' AND T2.DEST = 'ABQ' GROUP BY T2.OP_CARRIER_AIRLINE_ID ORDER BY COUNT(T2.OP_CARRIER_AIRLINE_ID) DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Which airport did Republic Airline fly the most from?
Evidence: Republic Airline refers to Description = 'Republic Airline: YX'; fly the most from refers to MAX(COUNT(ORIGIN));
SQL: SELECT T2.DEST FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Republic Airline: YX' GROUP BY T2.DEST ORDER BY COUNT(T2.DEST) DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Which airline does the aircraft with the fastest flight belong to?
Evidence: fastest flight refers to MIN(SUBTRACT(ACTUAL_ELAPSED_TIME, CRS_ELAPSED_TIME));
SQL: SELECT T1.OP_CARRIER_AIRLINE_ID FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ACTUAL_ELAPSED_TIME IS NOT NULL AND T1.CRS_ELAPSED_TIME IS NOT NULL ORDER BY T1.ACTUAL_ELAPSED_TIME - T1.CRS_ELAPSED_TIME ASC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018? Identify the plane number of the aircraft with the highest delayed hours.
Evidence: hours in total = DIVIDE(SUM(LATE_AIRCRAFT_DELAY), 60); Delta Air Lines refers to Description = 'Delta Air Lines Inc.: DL'; delayed due to a late aircraft refers to LATE_AIRCRAFT_DELAY; in August of 2018 refers to FL_DATE like '2018/8/%'; plane number refers to TAIL_NUM; highest delayed hours refers to MAX(DIVIDE(SUM(LATE_AIRCRAFT_DELAY),60));
SQL: SELECT T1.TAIL_NUM, SUM(CAST(T1.LATE_AIRCRAFT_DELAY AS REAL) / 60) AS delay FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.FL_DATE LIKE '2018/8/%' AND T2.Description = 'Delta Air Lines Inc.: DL' ORDER BY delay DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Please list any three airports with their codes.
SQL: SELECT Code, Description FROM Airports LIMIT 3
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the code of Mississippi Valley Airlines?
Evidence: Mississippi Valley Airlines refers to Description like 'Mississippi Valley Airlines%';
SQL: SELECT Code FROM `Air Carriers` WHERE Description LIKE 'Mississippi Valley Airlines%'
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the scheduled local departure time and the actual departure time of the flight from Philadelphia to Harrisburg with the plane's tail number N627AE on the 13th of August 2018?
Evidence: scheduled local departure time refers to CRS_DEP_TIME; actual departure time refers to DEP_TIME; from Philadelphia refers to ORIGIN = 'PHL'; to Harrisburg refers to DEST = 'MDT'; tail number refers to TAIL_NUM; TAIL_NUM = 'N627AE'; on the 13th of August 2018 refers to FL_DATE = '2018/8/13';
SQL: SELECT CRS_DEP_TIME, DEP_TIME FROM Airlines WHERE ORIGIN = 'PHL' AND DEST = 'MDT' AND TAIL_NUM = 'N627AE' AND FL_DATE = '2018/8/13'
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: How many flights on the 1st of August 2018 were coming from Allentown, Pennsylvania?
Evidence: 1st of August 2018 refers to FL_DATE = '2018/8/1'; coming from Allentown, Pennsylvania refers to ORIGIN = 'ABE';
SQL: SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'ABE'
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the only flight destination for flights from Albany?
Evidence: flight destination refers to DEST; from Albany refers to ORIGIN = 'ABY';
SQL: SELECT DEST FROM Airlines WHERE ORIGIN = 'ABY' GROUP BY DEST
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: How many flights from Dallas to Santa Ana departed on time?
Evidence: from Dallas refers to ORIGIN = 'DFW'; to Santa Ana refers to DEST = 'SNA'; departed on time refers to DEP_DELAY = 0;
SQL: SELECT COUNT(*) FROM Airlines WHERE DEST = 'SNA' AND ORIGIN = 'DFW' AND DEP_DELAY = 0
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: How many flights from Charlotte Douglas International Airport to Austin - Bergstrom International Airport experienced serious reasons that cause flight cancellation?
Evidence: from refers to ORIGIN; Charlotte Douglas International Airport refers to Description = 'Charlotte, NC: Charlotte Douglas International'; to refers to DEST; Austin - Bergstrom International Airport refers to Description = 'Austin, TX: Austin - Bergstrom International'; serious reasons refers to CANCELLATION_CODE = 'A';
SQL: SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ORIGIN = 'CLT' AND T1.DEST = 'AUS' AND T2.Description = 'Charlotte, NC: Charlotte Douglas International' AND T1.CANCELLATION_CODE = 'A'
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Which flight carrier operator has the most cancelled flights?
Evidence: flight carrier operator refers to OP_CARRIER_AIRLINE_ID; most cancelled flights refers to MAX(COUNT(CANCELLED = 1));
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.CANCELLED DESC LIMIT 1
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018?
Evidence: actual departure time refers to DEP_TIME; JetBlue Airways refers to Description like '%JetBlue Airways%'; tail number refers to TAIL_NUM; TAIL_NUM = 'N903JB'; to refers to DEST; Fort Lauderdale-Hollywood International Airport refers to Description like '%Fort Lauderdale-Hollywood%'; on the 20th of August 2018 refers to FL_DATE = '2018/8/20';
SQL: SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%'
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: Which flight carrier operator flies from Atlantic City to Fort Lauderdale?
Evidence: flight carrier operator refers to OP_CARRIER_AIRLINE_ID; from Atlantic City refers to ORIGIN = 'ACY'; to Fort Lauderdale refers to DEST = 'FLL';
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.ORIGIN = 'ACY' AND T1.DEST = 'FLL' GROUP BY T2.Description
Database: airline
Tables: Air Carriers, Airports, Airlines
Columns (table index, column name): -1, *, 0, Code, 0, Description, 1, Code, 1, Description, 2, FL_DATE, 2, OP_CARRIER_AIRLINE_ID, 2, TAIL_NUM, 2, OP_CARRIER_FL_NUM, 2, ORIGIN_AIRPORT_ID, 2, ORIGIN_AIRPORT_SEQ_ID, 2, ORIGIN_CITY_MARKET_ID, 2, ORIGIN, 2, DEST_AIRPORT_ID, 2, DEST_AIRPORT_SEQ_ID, 2, DEST_CITY_MARKET_ID, 2, DEST, 2, CRS_DEP_TIME, 2, DEP_TIME, 2, DEP_DELAY, 2, DEP_DELAY_NEW, 2, ARR_TIME, 2, ARR_DELAY, 2, ARR_DELAY_NEW, 2, CANCELLED, 2, CANCELLATION_CODE, 2, CRS_ELAPSED_TIME, 2, ACTUAL_ELAPSED_TIME, 2, CARRIER_DELAY, 2, WEATHER_DELAY, 2, NAS_DELAY, 2, SECURITY_DELAY, 2, LATE_AIRCRAFT_DELAY
Question: What is the airport description of the airport code A11?
SQL: SELECT Description FROM Airports WHERE Code = 'A11'