column_names: -1
*
0
airline id
0
airline name
0
abbreviation
0
country
1
city
1
airport code
1
airport name
1
country
1
country abbrev
2
airline
2
flight number
2
source airport
2
destination airport
column_names_original: -1
*
0
uid
0
Airline
0
Abbreviation
0
Country
1
City
1
AirportCode
1
AirportName
1
Country
1
CountryAbbrev
2
Airline
2
FlightNo
2
SourceAirport
2
DestAirport
column_types: text
number
text
text
text
text
text
text
text
text
number
number
text
text
db_id: flight_2
table_names: airlines
airports
flights
table_names_original: airlines
airports
flights

Which country does Airline "JetBlue Airways" belong to?
SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"

What country is Jetblue Airways affiliated with?
SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"

What is the abbreviation of Airline "JetBlue Airways"?
SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"

Which abbreviation corresponds to Jetblue Airways?
SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"

List all airline names and their abbreviations in "USA".
SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"

What are the airline names and abbreviations for airlines in the USA?
SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"

List the airport code and name in the city of Anthony.
SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"

Give the airport code and airport name corresonding to the city Anthony.
SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"

How many airlines do we have?
SELECT count(*) FROM AIRLINES

What is the total number of airlines?
SELECT count(*) FROM AIRLINES

How many airports do we have?
SELECT count(*) FROM AIRPORTS

Return the number of  airports.
SELECT count(*) FROM AIRPORTS

How many flights do we have?
SELECT count(*) FROM FLIGHTS

Return the number of flights.
SELECT count(*) FROM FLIGHTS

Which airline has abbreviation 'UAL'?
SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"

Give the airline with abbreviation 'UAL'.
SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"

How many airlines are from USA?
SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"

Return the number of airlines in the USA.
SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"

Which city and country is the Alton airport at?
SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"

Give the city and country for the Alton airport.
SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"

What is the airport name for airport 'AKO'?
SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"

Return the name of the airport with code 'AKO'.
SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"

What are airport names at City 'Aberdeen'?
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"

What are the names of airports in Aberdeen?
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"

How many flights depart from 'APG'?
SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"

Count the number of flights departing from 'APG'.
SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"

How many flights have destination ATO?
SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"

Count the number of flights into ATO.
SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"

How many flights depart from City Aberdeen?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

Return the number of flights departing from Aberdeen.
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

How many flights arriving in Aberdeen city?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

Return the number of flights arriving in Aberdeen.
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"

How many flights fly from Aberdeen to Ashley?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"

How many flights does airline 'JetBlue Airways' have?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"

Give the number of Jetblue Airways flights.
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"

How many 'United Airlines' flights go to Airport 'ASY'?
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"

Count the number of United Airlines flights arriving in ASY Airport.
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"

How many 'United Airlines' flights depart from Airport 'AHD'?
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"

Return the number of United Airlines flights leaving from AHD Airport.
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"

How many United Airlines flights go to City 'Aberdeen'?
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid  =  T1.Airline WHERE T2.City  =  "Aberdeen" AND T3.Airline  =  "United Airlines"

Count the number of United Airlines flights that arrive in Aberdeen.
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid  =  T1.Airline WHERE T2.City  =  "Aberdeen" AND T3.Airline  =  "United Airlines"

Which city has most number of arriving flights?
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1

Which city has the most frequent destination airport?
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1

Which city has most number of departing flights?
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1

Which city is the most frequent source airport?
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1

What is the code of airport that has the highest number of flights?
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1

What is the airport code of the airport with the most flights?
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1

What is the code of airport that has fewest number of flights?
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1

Give the code of the airport with the least flights.
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1

Which airline has most number of flights?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1

What airline serves the most flights?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1

Find the abbreviation and country of the airline that has fewest number of flights?
SELECT T1.Abbreviation ,  T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1

What is the abbreviation of the airilne has the fewest flights and what country is it in?
SELECT T1.Abbreviation ,  T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1

What are airlines that have some flight departing from airport 'AHD'?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "AHD"

Which airlines have a flight with source airport AHD?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "AHD"

What are airlines that have flights arriving at airport 'AHD'?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.DestAirport  =  "AHD"

Which airlines have a flight with destination airport AHD?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.DestAirport  =  "AHD"

Find all airlines that have flights from both airports 'APG' and 'CVO'.
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO"

Which airlines have departing flights from both APG and CVO airports?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO"

Find all airlines that have flights from airport 'CVO' but not from 'APG'.
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG"

Which airlines have departures from CVO but not from APG airports?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG"

Find all airlines that have at least 10 flights.
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  >  10

Which airlines have at least 10 flights?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  >  10

Find all airlines that have fewer than 200 flights.
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  <  200

Which airlines have less than 200 flights?
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  <  200

What are flight numbers of Airline "United Airlines"?
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid  =  T1.Airline WHERE T2.Airline  =  "United Airlines"

Which flight numbers correspond to United Airlines flights?
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid  =  T1.Airline WHERE T2.Airline  =  "United Airlines"

What are flight numbers of flights departing from Airport "APG"?
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"

Give the flight numbers of flights leaving from APG.
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"

What are flight numbers of flights arriving at Airport "APG"?
SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"

Give the flight numbers of flights landing at APG.
SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"

What are flight numbers of flights departing from City "Aberdeen "?
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

Give the flight numbers of flights leaving from Aberdeen.
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

What are flight numbers of flights arriving at City "Aberdeen"?
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

Give the flight numbers of flights arriving in Aberdeen.
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"

Find the number of flights landing in the city of Aberdeen or Abilene.
SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen" OR T2.city  =  "Abilene"

How many flights land in Aberdeen or Abilene?
SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen" OR T2.city  =  "Abilene"

Find the name of airports which do not have any flight in and out.
SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)

Which airports do not have departing or arriving flights?
SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)