aherntech/sparc huggingface dataset:
Database: flight_2
Question sequence:
What are all the airlines?
Of these, which is Jetblue Airways?
What is the country corresponding it?
SQL query sequence:
SELECT * FROM AIRLINES
SELECT * FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Final question: What country is Jetblue Airways affiliated with?
Final SQL: SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question sequence:
What are all the abbreviations?
What is the abbreviation for Jetblue Airways?
SQL query sequence:
SELECT Abbreviation FROM AIRLINES
SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Final question: Which abbreviation corresponds to Jetblue Airways?
Final SQL: SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question sequence:
List all airline names and their abbreviations.
Of these, list only those in the USA.
SQL query sequence:
SELECT Airline ,  Abbreviation FROM AIRLINES
SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"
Final question: What are the airline names and abbreviations for airlines in the USA?
Final SQL: SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2
Question sequence:
Find all information about the airport in the city Anthony.
What is the airport code and airport name?
SQL query sequence:
SELECT * FROM AIRPORTS WHERE city  =  "Anthony"
SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"
Final question: Give the airport code and airport name corresonding to the city Anthony.
Final SQL: SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"
Database: flight_2
Question sequence:
What are all the airlines?
How many are there?
SQL query sequence:
SELECT * FROM AIRLINES
SELECT count(*) FROM AIRLINES
Final question: What is the total number of airlines?
Final SQL: SELECT count(*) FROM AIRLINES
Database: flight_2
Question sequence:
What are all the airports?
How many are there?
SQL query sequence:
SELECT * FROM AIRPORTS
SELECT count(*) FROM AIRPORTS
Final question: Return the number of  airports.
Final SQL: SELECT count(*) FROM AIRPORTS
Database: flight_2
Question sequence:
What are all the flights?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS
SELECT count(*) FROM FLIGHTS
Final question: Return the number of flights.
Final SQL: SELECT count(*) FROM FLIGHTS
Database: flight_2
Question sequence:
What are all the airline names?
Of this, which has the abbreviation 'UAL'?
SQL query sequence:
SELECT Airline FROM AIRLINES
SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Final question: Give the airline with abbreviation 'UAL'.
Final SQL: SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Database: flight_2
Question sequence:
What are the names of the airlines in the USA?
How many are there?
SQL query sequence:
SELECT airline FROM AIRLINES WHERE Country  =  "USA"
SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Final question: Return the number of airlines in the USA.
Final SQL: SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2
Question sequence:
What are the city and country for all airports?
Of these, what are the city and country for Alton airport?
SQL query sequence:
SELECT City ,  Country FROM AIRPORTS
SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Final question: Give the city and country for the Alton airport.
Final SQL: SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Database: flight_2
Question sequence:
What are all the airport names?
Of these, which has code 'AKO'?
SQL query sequence:
SELECT AirportName FROM AIRPORTS
SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Final question: Return the name of the airport with code 'AKO'.
Final SQL: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Database: flight_2
Question sequence:
What are all the airport names?
Which is in Aberdeen?
SQL query sequence:
SELECT AirportName FROM AIRPORTS
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Final question: What are the names of airports in Aberdeen?
Final SQL: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Database: flight_2
Question sequence:
What are all the flights departing from 'APG'?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS WHERE SourceAirport  =  "APG"
SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Final question: Count the number of flights departing from 'APG'.
Final SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question sequence:
What flights land in ATO?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS WHERE DestAirport  =  "ATO"
SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Final question: Count the number of flights into ATO.
Final SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Database: flight_2
Question sequence:
What are all the flights derparting from Aberdeen?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Final question: Return the number of flights departing from Aberdeen.
Final SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question sequence:
What are all the flights arriving in Aberdeen.
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Final question: Return the number of flights arriving in Aberdeen.
Final SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question sequence:
What are all the flights that leave from Aberdeen?
Of those, which land in Ashley?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
SELECT * 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"
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"
Final question: How many flights fly from Aberdeen to Ashley?
Final SQL: 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"
Database: flight_2
Question sequence:
What are all the flights on Jetblue Airways?
How many are there?
SQL query sequence:
SELECT * FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
Final question: Give the number of Jetblue Airways flights.
Final SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
Database: flight_2
Question sequence:
What are the United Airlines flights?
How many are there?
How many land in ASY Airport?
SQL query sequence:
SELECT * FROM AIRLINES WHERE Airline  =  "United Airlines"
SELECT count(*) FROM AIRLINES WHERE Airline  =  "United Airlines"
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
Final question: Count the number of United Airlines flights arriving in ASY Airport.
Final SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
Database: flight_2
Question sequence:
What are the United Airlines flights?
Which ones leave from AHD?
How many are there?
SQL query sequence:
SELECT * FROM AIRLINES WHERE Airline  =  "United Airlines"
SELECT * FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "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"
Final question: Return the number of United Airlines flights leaving from AHD Airport.
Final SQL: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.SourceAirport  =  "AHD"
Database: flight_2
Question sequence:
Which United Airlines flights fly into Aberdeen?
How many are there?
SQL query sequence:
SELECT * 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"
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"
Final question: Count the number of United Airlines flights that arrive in Aberdeen.
Final SQL: 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"
Database: flight_2
Question sequence:
Name all cities that have destination airports.
Order them by number of arriving flights.
Which one has the most?
SQL query sequence:
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC
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
Final question: Which city has the most frequent destination airport?
Final SQL: 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
Database: flight_2
Question sequence:
Name all cities that have source airports.
Order them by number of departing flights.
Which one has the most?
SQL query sequence:
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.SourceAirport
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC
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
Final question: Which city is the most frequent source airport?
Final SQL: 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
Database: flight_2
Question sequence:
What are airport codes of any airport with a arriving flight?
Also include codes of airports with departure flights.
Which one has the highest number of flights?
SQL query sequence:
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport
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
Final question: What is the airport code of the airport with the most flights?
Final SQL: 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
Database: flight_2
Question sequence:
What are airport codes of any airport with a arriving flight?
Also include codes of airports with departure flights.
Which one has the least number of flights?
SQL query sequence:
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport
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
Final question: Give the code of the airport with the least flights.
Final SQL: 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
Database: flight_2
Question sequence:
Count the number of flights by airline.
Which airline has the most?
SQL query sequence:
SELECT count(*) ,  T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline
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
Final question: What airline serves the most flights?
Final SQL: 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
Database: flight_2
Question sequence:
What are all the airline abbreviations and what countries are they in?
Order them by the number of flights that they have.
Which one has the fewest?
SQL query sequence:
SELECT Abbreviation ,  Country FROM AIRLINES
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(*)
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
Final question: What is the abbreviation of the airilne has the fewest flights and what country is it in?
Final SQL: 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
Database: flight_2
Question sequence:
Which flights leave from AHD?
What are their airlines?
SQL query sequence:
SELECT * FROM FLIGHTS WHERE SourceAirport  =  "AHD"
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "AHD"
Final question: Which airlines have a flight with source airport AHD?
Final SQL: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "AHD"
Database: flight_2
Question sequence:
Which flights arrive in AHD?
What are their airlines?
SQL query sequence:
SELECT * FROM FLIGHTS WHERE DestAirport  =  "AHD"
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.DestAirport  =  "AHD"
Final question: Which airlines have a flight with destination airport AHD?
Final SQL: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.DestAirport  =  "AHD"
Database: flight_2
Question sequence:
Which airlines have flights departing from APG?
Of those, which also have flights from CVO?
SQL query sequence:
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG"
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"
Final question: Which airlines have departing flights from both APG and CVO airports?
Final SQL: 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"
Database: flight_2
Question sequence:
Which airlines have flights from CVO?
Of these, which do not have flights from APG?
SQL query sequence:
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO"
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"
Final question: Which airlines have departures from CVO but not from APG airports?
Final SQL: 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"
Database: flight_2
Question sequence:
What are all the airlines?
Which ones have more than 10 flights?
SQL query sequence:
SELECT DISTINCT Airline FROM AIRLINES
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  >  10
Final question: Which airlines have at least 10 flights?
Final SQL: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  >  10
Database: flight_2
Question sequence:
What are all the airlines?
Which ones have less than 200 flights?
SQL query sequence:
SELECT DISTINCT Airline FROM AIRLINES
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  <  200
Final question: Which airlines have less than 200 flights?
Final SQL: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  <  200
Database: flight_2
Question sequence:
What are all the flight numbers?
Which belong to United Airlines?
SQL query sequence:
SELECT FlightNo FROM FLIGHTS
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid  =  T1.Airline WHERE T2.Airline  =  "United Airlines"
Final question: Which flight numbers correspond to United Airlines flights?
Final SQL: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid  =  T1.Airline WHERE T2.Airline  =  "United Airlines"
Database: flight_2
Question sequence:
What are all the flight numbers?
Of these, which correspond to flights leaving from APG?
SQL query sequence:
SELECT FlightNo FROM FLIGHTS
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"
Final question: Give the flight numbers of flights leaving from APG.
Final SQL: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question sequence:
What are all the flight numbers?
Also, which numbers are for flights that land in APG?
SQL query sequence:
SELECT FlightNo FROM FLIGHTS
SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"
Final question: Give the flight numbers of flights landing at APG.
Final SQL: SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"
Database: flight_2
Question sequence:
What are all the flight numbers?
Of these, which are departure flights?
Which leave from Aberdeen?
SQL query sequence:
SELECT FlightNo FROM FLIGHTS
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport   =  T2.AirportCode
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Final question: Give the flight numbers of flights leaving from Aberdeen.
Final SQL: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question sequence:
What are all the flight numbers?
Of these, which are arrival flights?
Which land in Aberdeen?
SQL query sequence:
SELECT FlightNo FROM FLIGHTS
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport   =  T2.AirportCode
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Final question: Give the flight numbers of flights arriving in Aberdeen.
Final SQL: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport   =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question sequence:
What flights land in Aberdeen?
Also include flights that land in Abilene.
How many are there?
SQL query sequence:
SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen"
SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen" OR T2.city  =  "Abilene"
SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen" OR T2.city  =  "Abilene"
Final question: How many flights land in Aberdeen or Abilene?
Final SQL: SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.city  =  "Aberdeen" OR T2.city  =  "Abilene"
Database: flight_2
Question sequence:
What are the source airports?
Also include the destination airports.
Which airports are not included?
SQL query sequence:
SELECT SourceAirport FROM Flights
SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights
SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
Final question: Which airports do not have departing or arriving flights?
Final SQL: SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
Database: pets_1
Question sequence:
What information is there on pets?
Which pets weigh more than 10?
How many are there?
SQL query sequence:
SELECT * FROM pets
SELECT * FROM pets WHERE weight  >  10
SELECT count(*) FROM pets WHERE weight  >  10
Final question: How many pets have a greater weight than 10?
Final SQL: SELECT count(*) FROM pets WHERE weight  >  10
Database: pets_1
Question sequence:
Order the pets by age
How much does each one weigh?
What about the first one?
SQL query sequence:
SELECT * FROM pets ORDER BY pet_age
SELECT weight FROM pets ORDER BY pet_age
SELECT weight FROM pets ORDER BY pet_age LIMIT 1
Final question: How much does the youngest dog weigh?
Final SQL: SELECT weight FROM pets ORDER BY pet_age LIMIT 1
Database: pets_1
Question sequence:
What are the different types of pets?
For each of those types, what is the maximum weight?
SQL query sequence:
SELECT DISTINCT petType FROM pets
SELECT max(weight) ,  petType FROM pets GROUP BY petType
Final question: List the maximum weight and type for each type of pet.
Final SQL: SELECT max(weight) ,  petType FROM pets GROUP BY petType
Database: pets_1
Question sequence:
Which pets are owned by students older than 20?
How many are there?
SQL query sequence:
SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20
SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20
Final question: How many pets are owned by students that have an age greater than 20?
Final SQL: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20
Database: pets_1
Question sequence:
Who are the female students?
Of those, who has a pet?
How many of those have dogs?
SQL query sequence:
SELECT * FROM student WHERE sex  =  'F'
SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.sex  =  'F'
SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'
Final question: How many dog pets are raised by female students?
Final SQL: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'