target-benchmark/spider-queries huggingface dataset:
Database: car_1 (tables: model_list, car_names, cars_data)
Question: Which distinct car models are the produced after 1980?
SQL: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model  =  T2.model JOIN CARS_DATA AS T3 ON T2.MakeId  =  T3.id WHERE T3.year  >  1980;
Database: car_1 (tables: model_list, car_names, cars_data)
Question: What are the different models for the cards produced after 1980?
SQL: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model  =  T2.model JOIN CARS_DATA AS T3 ON T2.MakeId  =  T3.id WHERE T3.year  >  1980;
Database: car_1 (tables: countries, continents, car_makers)
Question: How many car makers are there in each continents? List the continent name and the count.
SQL: SELECT T1.Continent ,  count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId  =  T2.continent JOIN car_makers AS T3 ON T2.CountryId  =  T3.Country GROUP BY T1.Continent;
Database: car_1 (tables: countries, continents, car_makers)
Question: What is the name of each continent and how many car makers are there in each one?
SQL: SELECT T1.Continent ,  count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId  =  T2.continent JOIN car_makers AS T3 ON T2.CountryId  =  T3.Country GROUP BY T1.Continent;
Database: car_1 (tables: countries, car_makers)
Question: Which of the countries has the most car makers? List the country name.
SQL: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country  =  T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;
Database: car_1 (tables: countries, car_makers)
Question: What is the name of the country with the most car makers?
SQL: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country  =  T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;
Database: car_1 (tables: car_makers, model_list)
Question: How many car models are produced by each maker ? Only list the count and the maker full name .
SQL: select count(*) ,  t2.fullname from model_list as t1 join car_makers as t2 on t1.maker  =  t2.id group by t2.id;
Database: car_1 (tables: model_list, car_makers)
Question: What is the number of car models that are produced by each maker and what is the id and full name of each maker?
SQL: SELECT Count(*) ,  T2.FullName ,  T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker  =  T2.Id GROUP BY T2.id;
Database: car_1 (tables: car_names, cars_data)
Question: What is the accelerate of the car make amc hornet sportabout (sw)?
SQL: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T2.Make  =  'amc hornet sportabout (sw)';
Database: car_1 (tables: car_names, cars_data)
Question: How much does the car accelerate that makes amc hornet sportabout (sw)?
SQL: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T2.Make  =  'amc hornet sportabout (sw)';
Database: car_1 (tables: countries, car_makers)
Question: How many car makers are there in france?
SQL: SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country  =  T2.CountryId WHERE T2.CountryName  =  'france';
Database: car_1 (tables: countries, car_makers)
Question: What is the number of makers of care in France?
SQL: SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country  =  T2.CountryId WHERE T2.CountryName  =  'france';
Database: car_1 (tables: countries, model_list, car_makers)
Question: How many car models are produced in the usa?
SQL: SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker  =  T2.Id JOIN COUNTRIES AS T3 ON T2.Country  =  T3.CountryId WHERE T3.CountryName  =  'usa';
Database: car_1 (tables: countries, model_list, car_makers)
Question: What is the count of the car models produced in the United States?
SQL: SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker  =  T2.Id JOIN COUNTRIES AS T3 ON T2.Country  =  T3.CountryId WHERE T3.CountryName  =  'usa';
Database: car_1 (tables: cars_data)
Question: What is the average miles per gallon(mpg) of the cars with 4 cylinders?
SQL: SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders  =  4;
Database: car_1 (tables: cars_data)
Question: What is the average miles per gallon of all the cards with 4 cylinders?
SQL: SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders  =  4;
Database: car_1 (tables: cars_data)
Question: What is the smallest weight of the car produced with 8 cylinders on 1974 ?
SQL: select min(weight) from cars_data where cylinders  =  8 and year  =  1974
Database: car_1 (tables: cars_data)
Question: What is the minimum weight of the car with 8 cylinders produced in 1974 ?
SQL: select min(weight) from cars_data where cylinders  =  8 and year  =  1974
Database: car_1 (tables: model_list)
Question: What are all the makers and models?
SQL: SELECT Maker ,  Model FROM MODEL_LIST;
Database: car_1 (tables: model_list)
Question: What are the makers and models?
SQL: SELECT Maker ,  Model FROM MODEL_LIST;
Database: car_1 (tables: countries, car_makers)
Question: What are the countries having at least one car maker? List name and id.
SQL: SELECT T1.CountryName ,  T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country GROUP BY T1.CountryId HAVING count(*)  >=  1;
Database: car_1 (tables: countries, car_makers)
Question: What are the names and ids of all countries with at least one car maker?
SQL: SELECT T1.CountryName ,  T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country GROUP BY T1.CountryId HAVING count(*)  >=  1;
Database: car_1 (tables: cars_data)
Question: What is the number of the cars with horsepower more than 150?
SQL: SELECT count(*) FROM CARS_DATA WHERE horsepower  >  150;
Database: car_1 (tables: cars_data)
Question: What is the number of cars with a horsepower greater than 150?
SQL: SELECT count(*) FROM CARS_DATA WHERE horsepower  >  150;
Database: car_1 (tables: cars_data)
Question: What is the average weight of cars each year?
SQL: SELECT avg(Weight) ,  YEAR FROM CARS_DATA GROUP BY YEAR;
Database: car_1 (tables: cars_data)
Question: What is the average weight and year for each year?
SQL: SELECT avg(Weight) ,  YEAR FROM CARS_DATA GROUP BY YEAR;
Database: car_1 (tables: countries, continents, car_makers)
Question: Which countries in europe have at least 3 car manufacturers?
SQL: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent  =  T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId  =  T3.Country WHERE T2.Continent  =  'europe' GROUP BY T1.CountryName HAVING count(*)  >=  3;
Database: car_1 (tables: countries, continents, car_makers)
Question: What are the names of all European countries with at least 3 manufacturers?
SQL: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent  =  T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId  =  T3.Country WHERE T2.Continent  =  'europe' GROUP BY T1.CountryName HAVING count(*)  >=  3;
Database: car_1 (tables: cars_data, car_names)
Question: What is the maximum horsepower and the make of the car models with 3 cylinders?
SQL: SELECT T2.horsepower ,  T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.cylinders  =  3 ORDER BY T2.horsepower DESC LIMIT 1;
Database: car_1 (tables: cars_data, car_names)
Question: What is the largest amount of horsepower for the models with 3 cylinders and what make is it?
SQL: SELECT T2.horsepower ,  T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.cylinders  =  3 ORDER BY T2.horsepower DESC LIMIT 1;
Database: car_1 (tables: cars_data, car_names)
Question: Which model saves the most gasoline? That is to say, have the maximum miles per gallon.
SQL: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id ORDER BY T2.mpg DESC LIMIT 1;
Database: car_1 (tables: cars_data, car_names)
Question: What is the car model with the highest mpg ?
SQL: select t1.model from car_names as t1 join cars_data as t2 on t1.makeid  =  t2.id order by t2.mpg desc limit 1;
Database: car_1 (tables: cars_data)
Question: What is the average horsepower of the cars before 1980?
SQL: SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR  <  1980;
Database: car_1 (tables: cars_data)
Question: What is the average horsepower for all cars produced before 1980 ?
SQL: select avg(horsepower) from cars_data where year  <  1980;
Database: car_1 (tables: cars_data, car_names)
Question: What is the average edispl of the cars of model volvo?
SQL: SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T1.Model  =  'volvo';
Database: car_1 (tables: cars_data, car_names)
Question: What is the average edispl for all volvos?
SQL: SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T1.Model  =  'volvo';
Database: car_1 (tables: cars_data)
Question: What is the maximum accelerate for different number of cylinders?
SQL: SELECT max(Accelerate) ,  Cylinders FROM CARS_DATA GROUP BY Cylinders;
Database: car_1 (tables: cars_data)
Question: What is the maximum accelerate for all the different cylinders?
SQL: SELECT max(Accelerate) ,  Cylinders FROM CARS_DATA GROUP BY Cylinders;
Database: car_1 (tables: car_names)
Question: Which model has the most version(make) of cars?
SQL: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;
Database: car_1 (tables: car_names)
Question: What model has the most different versions?
SQL: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;
Database: car_1 (tables: cars_data)
Question: How many cars have more than 4 cylinders?
SQL: SELECT count(*) FROM CARS_DATA WHERE Cylinders  >  4;
Database: car_1 (tables: cars_data)
Question: What is the number of cars with more than 4 cylinders?
SQL: SELECT count(*) FROM CARS_DATA WHERE Cylinders  >  4;
Database: car_1 (tables: cars_data)
Question: how many cars were produced in 1980?
SQL: SELECT count(*) FROM CARS_DATA WHERE YEAR  =  1980;
Database: car_1 (tables: cars_data)
Question: In 1980, how many cars were made?
SQL: SELECT count(*) FROM CARS_DATA WHERE YEAR  =  1980;
Database: car_1 (tables: model_list, car_makers)
Question: How many car models were produced by the maker with full name American Motor Company?
SQL: SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker WHERE T1.FullName  =  'American Motor Company';
Database: car_1 (tables: model_list, car_makers)
Question: What is the number of car models created by the car maker American Motor Company?
SQL: SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker WHERE T1.FullName  =  'American Motor Company';
Database: car_1 (tables: model_list, car_makers)
Question: Which makers designed more than 3 car models? List full name and the id.
SQL: SELECT T1.FullName ,  T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker GROUP BY T1.Id HAVING count(*)  >  3;
Database: car_1 (tables: model_list, car_makers)
Question: What are the names and ids of all makers with more than 3 models?
SQL: SELECT T1.FullName ,  T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker GROUP BY T1.Id HAVING count(*)  >  3;
Database: car_1 (tables: car_makers, model_list, car_names, cars_data)
Question: Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?
SQL: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model  =  T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker  =  T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId  =  T4.Id WHERE T3.FullName  =  'General Motors' OR T4.weight  >  3500;
Database: car_1 (tables: car_makers, model_list, car_names, cars_data)
Question: What are the different models created by either the car maker General Motors or weighed more than 3500?
SQL: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model  =  T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker  =  T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId  =  T4.Id WHERE T3.FullName  =  'General Motors' OR T4.weight  >  3500;
Database: car_1 (tables: cars_data)
Question: In which years cars were produced weighing no less than 3000 and no more than 4000 ?
SQL: select distinct year from cars_data where weight between 3000 and 4000;
Database: car_1 (tables: cars_data)
Question: What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?
SQL: select distinct year from cars_data where weight between 3000 and 4000;
Database: car_1 (tables: cars_data)
Question: What is the horsepower of the car with the largest accelerate?
SQL: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;
Database: car_1 (tables: cars_data)
Question: What is the horsepower of the car with the greatest accelerate?
SQL: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;
Database: car_1 (tables: car_names, cars_data)
Question: For model volvo, how many cylinders does the car with the least accelerate have?
SQL: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T2.Model  =  'volvo' ORDER BY T1.accelerate ASC LIMIT 1;
Database: car_1 (tables: car_names, cars_data)
Question: For a volvo model, how many cylinders does the version with least accelerate have?
SQL: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T2.Model  =  'volvo' ORDER BY T1.accelerate ASC LIMIT 1;
Database: car_1 (tables: cars_data)
Question: How many cars have a larger accelerate than the car with the largest horsepower?
SQL: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate  >  ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );
Database: car_1 (tables: cars_data)
Question: What is the number of cars with a greater accelerate than the one with the most horsepower?
SQL: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate  >  ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );
Database: car_1 (tables: car_makers, countries)
Question: How many countries has more than 2 car makers ?
SQL: select count(*) from countries as t1 join car_makers as t2 on t1.countryid  =  t2.country group by t1.countryid having count(*)  >  2
Database: car_1 (tables: car_makers, countries)
Question: What is the number of countries with more than 2 car makers ?
SQL: select count(*) from countries as t1 join car_makers as t2 on t1.countryid  =  t2.country group by t1.countryid having count(*)  >  2
Database: car_1 (tables: cars_data)
Question: How many cars has over 6 cylinders?
SQL: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders  >  6;
Database: car_1 (tables: cars_data)
Question: What is the number of carsw ith over 6 cylinders?
SQL: SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders  >  6;
Database: car_1 (tables: cars_data, car_names)
Question: For the cars with 4 cylinders, which model has the largest horsepower?
SQL: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.Cylinders  =  4 ORDER BY T2.horsepower DESC LIMIT 1;
Database: car_1 (tables: cars_data, car_names)
Question: For all of the 4 cylinder cars, which model has the most horsepower?
SQL: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.Cylinders  =  4 ORDER BY T2.horsepower DESC LIMIT 1;
Database: car_1 (tables: car_names, cars_data)
Question: Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.
SQL: SELECT T2.MakeId ,  T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T1.Horsepower  >  (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders  <=  3;
Database: car_1 (tables: cars_data, car_names)
Question: Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?
SQL: select t2.makeid ,  t2.make from cars_data as t1 join car_names as t2 on t1.id  =  t2.makeid where t1.horsepower  >  (select min(horsepower) from cars_data) and t1.cylinders  <  4;
Database: car_1 (tables: cars_data)
Question: What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?
SQL: select max(mpg) from cars_data where cylinders  =  8 or year  <  1980
Database: car_1 (tables: cars_data)
Question: What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?
SQL: select max(mpg) from cars_data where cylinders  =  8 or year  <  1980
Database: car_1 (tables: car_makers, model_list, car_names, cars_data)
Question: Which models are lighter than 3500 but not built by the 'Ford Motor Company'?
SQL: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model  =  T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId  =  T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker  =  T4.Id WHERE T3.weight  <  3500 AND T4.FullName != 'Ford Motor Company';
Database: car_1 (tables: car_makers, model_list, car_names, cars_data)
Question: What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?
SQL: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model  =  T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId  =  T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker  =  T4.Id WHERE T3.weight  <  3500 AND T4.FullName != 'Ford Motor Company';
Database: car_1 (tables: car_makers, countries)
Question: What are the name of the countries where there is not a single car maker?
SQL: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId  =  T2.Country;
Database: car_1 (tables: car_makers, countries)
Question: What are the names of the countries with no car makers?
SQL: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId  =  T2.Country;
Database: car_1 (tables: car_makers, car_names, model_list)
Question: Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .
SQL: select t1.id ,  t1.maker from car_makers as t1 join model_list as t2 on t1.id  =  t2.maker group by t1.id having count(*)  >=  2 intersect select t1.id ,  t1.maker from car_makers as t1 join model_list as t2 on t1.id  =  t2.maker join car_names as t3 on t2.model  =  t3.model group by t1.id having count(*)  >  3;
Database: car_1 (tables: car_names, model_list, car_makers)
Question: What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?
SQL: SELECT T1.Id ,  T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker GROUP BY T1.Id HAVING count(*)  >=  2 INTERSECT SELECT T1.Id ,  T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker JOIN CAR_NAMES AS T3 ON T2.model  =  T3.model GROUP BY T1.Id HAVING count(*)  >  3;
Database: car_1 (tables: car_makers, model_list, countries)
Question: What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?
SQL: SELECT T1.countryId ,  T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country GROUP BY T1.countryId HAVING count(*)  >  3 UNION SELECT T1.countryId ,  T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country JOIN MODEL_LIST AS T3 ON T2.Id  =  T3.Maker WHERE T3.Model  =  'fiat';
Database: car_1 (tables: car_makers, countries, model_list)
Question: What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?
SQL: select t1.countryid ,  t1.countryname from countries as t1 join car_makers as t2 on t1.countryid  =  t2.country group by t1.countryid having count(*)  >  3 union select t1.countryid ,  t1.countryname from countries as t1 join car_makers as t2 on t1.countryid  =  t2.country join model_list as t3 on t2.id  =  t3.maker where t3.model  =  'fiat';
Database: flight_2 (tables: airlines)
Question: Which country does Airline "JetBlue Airways" belong to?
SQL: SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2 (tables: airlines)
Question: What country is Jetblue Airways affiliated with?
SQL: SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2 (tables: airlines)
Question: What is the abbreviation of Airline "JetBlue Airways"?
SQL: SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2 (tables: airlines)
Question: Which abbreviation corresponds to Jetblue Airways?
SQL: SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2 (tables: airlines)
Question: List all airline names and their abbreviations in "USA".
SQL: SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2 (tables: airlines)
Question: What are the airline names and abbreviations for airlines in the USA?
SQL: SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2 (tables: airports)
Question: List the airport code and name in the city of Anthony.
SQL: SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"
Database: flight_2 (tables: airports)
Question: Give the airport code and airport name corresonding to the city Anthony.
SQL: SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"
Database: flight_2 (tables: airlines)
Question: How many airlines do we have?
SQL: SELECT count(*) FROM AIRLINES
Database: flight_2 (tables: airlines)
Question: What is the total number of airlines?
SQL: SELECT count(*) FROM AIRLINES
Database: flight_2 (tables: airports)
Question: How many airports do we have?
SQL: SELECT count(*) FROM AIRPORTS
Database: flight_2 (tables: airports)
Question: Return the number of  airports.
SQL: SELECT count(*) FROM AIRPORTS
Database: flight_2 (tables: flights)
Question: How many flights do we have?
SQL: SELECT count(*) FROM FLIGHTS
Database: flight_2 (tables: flights)
Question: Return the number of flights.
SQL: SELECT count(*) FROM FLIGHTS
Database: flight_2 (tables: airlines)
Question: Which airline has abbreviation 'UAL'?
SQL: SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Database: flight_2 (tables: airlines)
Question: Give the airline with abbreviation 'UAL'.
SQL: SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Database: flight_2 (tables: airlines)
Question: How many airlines are from USA?
SQL: SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2 (tables: airlines)
Question: Return the number of airlines in the USA.
SQL: SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2 (tables: airports)
Question: Which city and country is the Alton airport at?
SQL: SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Database: flight_2 (tables: airports)
Question: Give the city and country for the Alton airport.
SQL: SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Database: flight_2 (tables: airports)
Question: What is the airport name for airport 'AKO'?
SQL: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Database: flight_2 (tables: airports)
Question: Return the name of the airport with code 'AKO'.
SQL: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Database: flight_2 (tables: airports)
Question: What are airport names at City 'Aberdeen'?
SQL: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Database: flight_2 (tables: airports)
Question: What are the names of airports in Aberdeen?
SQL: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Database: flight_2 (tables: flights)
Question: How many flights depart from 'APG'?
SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2 (tables: flights)
Question: Count the number of flights departing from 'APG'.
SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2 (tables: flights)
Question: How many flights have destination ATO?
SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Database: flight_2 (tables: flights)
Question: Count the number of flights into ATO.
SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"