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: What is the total number of flights that have Oklahoma as their origin?
Evidence: Oklahoma as origin refers to Origin = 'OKC';
SQL: SELECT COUNT(*) AS num FROM Airlines WHERE Origin = 'OKC'
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 airports have a code starting with the letter C?
Evidence: code starting with the letter C refers to Code like 'C%';
SQL: SELECT COUNT(*) FROM Airports WHERE Code LIKE 'C%'
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: Provide the destinations of flight number 1596.
Evidence: destination refers to DEST; flight number refers to OP_CARRIER_FL_NUM; OP_CARRIER_FL_NUM = 1596;
SQL: SELECT DEST FROM Airlines WHERE OP_CARRIER_FL_NUM = 1596
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 description of the airports that have code that ends with number 3?
Evidence: code that ends with number 3 refers to Code like '%3';
SQL: SELECT Description FROM Airports WHERE Code LIKE '%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: Give the code of the airport described as Driftwood Bay, AK: Driftwood Bay Airport.
Evidence: Driftwood Bay, AK: Driftwood Bay Airport refers to Description = 'Driftwood Bay, AK: Driftwood Bay Airport';
SQL: SELECT Code FROM Airports WHERE Description = 'Driftwood Bay, AK: Driftwood Bay Airport'
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 cancelled flights are there?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT COUNT(*) FROM Airlines WHERE CANCELLED = 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: List the tail number of flights that flew on August 17, 2018.
Evidence: tail number refers to TAIL_NUM; on August 17, 2018 refers to FL_DATE = '2018/8/17';
SQL: SELECT TAIL_NUM FROM Airlines WHERE FL_DATE = '2018/8/17' GROUP BY 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: Provide the origin of the flight that has the shortest actual elapsed time.
Evidence: shortest actual elapsed time refers to MIN(ACTUAL_ELAPSED_TIME);
SQL: SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_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: Provide the date and tail number of flight with air carrier "Ross Aviation Inc.: GWE".
Evidence: date of flight refers to FL_DATE; tail number of flight refers to TAIL_NUM; Ross Aviation Inc.: GWE refers to Description = 'Ross Aviation Inc.: GWE';
SQL: SELECT T1.FL_DATE, T1.TAIL_NUM FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T2.Description = 'Ross Aviation Inc.: GWE'
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 air carrier description and code of the flight with the shortest arrival time.
Evidence: shortest arrival time refers to MIN(ARR_TIME);
SQL: SELECT T1.Description, T1.Code FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ARR_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 flights of air carrier called JetBlue Airways: B6 have 0 new arrival delay?
Evidence: JetBlue Airways refers to Description = '%JetBlue Airway%'; 0 new arrival delay refers to ARR_DELAY_NEW = 0;
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%JetBlue Airways: B6%' AND T2.ARR_DELAY_NEW = 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: Provide the air carrier description of all flights arriving at Miami.
Evidence: arriving at Miami refers to DEST = 'MIA';
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'MIA'
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 air carrier's description of the cancelled flights?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.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: Give the actual elapsed time of the flights with air carrier named Semo Aviation Inc.: SEM.
Evidence: actual elapsed time refers to ACTUAL_ELAPSED_TIME; Semo Aviation Inc.: SEM. Refers to Description = 'Semo Aviation Inc.: SEM';
SQL: SELECT T2.ACTUAL_ELAPSED_TIME FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Semo Aviation Inc.: SEM'
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 flights with air carrier described as Asap Air Inc.: ASP, what is the tail number of the flight with the longest departure delay?
Evidence: Asap Air Inc.: ASP refers to Description = 'Asap Air Inc.: ASP'; tail number refers to TAIL_NUM; longest departure delay refers to MAX(DEP_DELAY);
SQL: SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Asap Air Inc.: ASP' ORDER BY T2.DEP_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: List the air carrier's description of the flights with 0 departure delay.
Evidence: 0 departure delay refers to DEP_DELAY = 0;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEP_DELAY = 0 GROUP BY T1.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: Provide the air carrier description of the flight with the highest actual elapsed time.
Evidence: highest actual elapsed time refers to MAX(ACTUAL_ELAPSED_TIME);
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.ACTUAL_ELAPSED_TIME 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 destinations of the flights with air carrier description "Southeast Alaska Airlines: WEB"?
Evidence: destinations refers to DEST; Southeast Alaska Airlines: WEB refers to Description = 'Southeast Alaska Airlines: WEB';
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 = 'Southeast Alaska Airlines: WEB'
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: From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there?
Evidence: From August 10 to August 20, 2018 refers to FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'; cancelled flights refers to CANCELLED = 1; Trans Southern Airways: 'Spirit Air Lines: NK' refers to Description = 'Spirit Air Lines: NK';
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'
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 total number of flights that flew on August 2, 2018 with air carrier described as Horizon Air?
Evidence: on August 2, 2018 refers to FL_DATE = '2018/8/2'; Horizon Air refers to Description which includs 'Horizon Air';
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Horizon Air%' AND T2.FL_DATE = '2018/8/2'
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 the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below?
Evidence: tail number refers to TAIL_NUM; Iscargo Hf: ICQ refers to Description = 'Iscargo Hf: ICQ'; arrival time of 1000 and below refers to ARR_TIME < = 1000;
SQL: SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_TIME <= 1000 AND T1.Description = 'Iscargo Hf: ICQ'
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 flight date of flights with air carrier described as Profit Airlines Inc.: XBH which have an actual elapsed time below 100.
Evidence: flight date refers to FL_DATE; Profit Airlines Inc.: XBH refers to Description = 'Profit Airlines Inc.: XBH'; actual elapsed time below 100 refers to ACTUAL_ELAPSED_TIME < 100;
SQL: SELECT T2.FL_DATE FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ACTUAL_ELAPSED_TIME < 100 AND T1.Description = 'Profit Airlines Inc.: XBH'
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 flights with air carrier named Republic Airline, how many of the flights have departure delay of 30 minutes and above?
Evidence: Republic Airline refers to Description which contains 'Republic Airline'; departure delay of 30 minutes and above refers to DEP_DELAY > 30;
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Republic Airline%' AND T2.DEP_DELAY > 30
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 air carriers of the flights that flew on August 25, 2018 that have departure delay of -5?
Evidence: on August 25, 2018 refers to FL_DATE = '2018/8/25'; departure delay of -5 refers to DEP_DELAY = -5;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.FL_DATE = '2018/8/25' GROUP BY T1.Description