minktn/spider-data huggingface dataset:
Database: concert_singer
Question: How many singers do we have?
SQL: SELECT count(*) FROM singer
Database: concert_singer
Question: What is the total number of singers?
SQL: SELECT count(*) FROM singer
Database: concert_singer
Question: Show name, country, age for all singers ordered by age from the oldest to the youngest.
SQL: SELECT name ,  country ,  age FROM singer ORDER BY age DESC
Database: concert_singer
Question: What are the names, countries, and ages for every singer in descending order of age?
SQL: SELECT name ,  country ,  age FROM singer ORDER BY age DESC
Database: concert_singer
Question: What is the average, minimum, and maximum age of all singers from France?
SQL: SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'
Database: concert_singer
Question: What is the average, minimum, and maximum age for all French singers?
SQL: SELECT avg(age) ,  min(age) ,  max(age) FROM singer WHERE country  =  'France'
Database: concert_singer
Question: Show the name and the release year of the song by the youngest singer.
SQL: SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1
Database: concert_singer
Question: What are the names and release years for all the songs of the youngest singer?
SQL: SELECT song_name ,  song_release_year FROM singer ORDER BY age LIMIT 1
Database: concert_singer
Question: What are all distinct countries where singers above age 20 are from?
SQL: SELECT DISTINCT country FROM singer WHERE age  >  20
Database: concert_singer
Question: What are  the different countries with singers above age 20?
SQL: SELECT DISTINCT country FROM singer WHERE age  >  20
Database: concert_singer
Question: Show all countries and the number of singers in each country.
SQL: SELECT country ,  count(*) FROM singer GROUP BY country
Database: concert_singer
Question: How many singers are from each country?
SQL: SELECT country ,  count(*) FROM singer GROUP BY country
Database: concert_singer
Question: List all song names by singers above the average age.
SQL: SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)
Database: concert_singer
Question: What are all the song names by singers who are older than average?
SQL: SELECT song_name FROM singer WHERE age  >  (SELECT avg(age) FROM singer)
Database: concert_singer
Question: Show location and name for all stadiums with a capacity between 5000 and 10000.
SQL: SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000
Database: concert_singer
Question: What are the locations and names of all stations with capacity between 5000 and 10000?
SQL: SELECT LOCATION ,  name FROM stadium WHERE capacity BETWEEN 5000 AND 10000
Database: concert_singer
Question: What is the maximum capacity and the average of all stadiums ?
SQL: select max(capacity), average from stadium
Database: concert_singer
Question: What is the average and maximum capacities for all stadiums ?
SQL: select avg(capacity) ,  max(capacity) from stadium
Database: concert_singer
Question: What is the name and capacity for the stadium with highest average attendance?
SQL: SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1
Database: concert_singer
Question: What is the name and capacity for the stadium with the highest average attendance?
SQL: SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1
Database: concert_singer
Question: How many concerts are there in year 2014 or 2015?
SQL: SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015
Database: concert_singer
Question: How many concerts occurred in 2014 or 2015?
SQL: SELECT count(*) FROM concert WHERE YEAR  =  2014 OR YEAR  =  2015
Database: concert_singer
Question: Show the stadium name and the number of concerts in each stadium.
SQL: SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id
Database: concert_singer
Question: For each stadium, how many concerts play there?
SQL: SELECT T2.name ,  count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id GROUP BY T1.stadium_id
Database: concert_singer
Question: Show the stadium name and capacity with most number of concerts in year 2014 or after.
SQL: SELECT T2.name ,  T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  >=  2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1
Database: concert_singer
Question: What is the name and capacity of the stadium with the most concerts after 2013 ?
SQL: select t2.name ,  t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id  =  t2.stadium_id where t1.year  >  2013 group by t2.stadium_id order by count(*) desc limit 1
Database: concert_singer
Question: Which year has most number of concerts?
SQL: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: concert_singer
Question: What is the year that had the most concerts?
SQL: SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: concert_singer
Question: Show the stadium names without any concert.
SQL: SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)
Database: concert_singer
Question: What are the names of the stadiums without any concerts?
SQL: SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)
Database: concert_singer
Question: Show countries where a singer above age 40 and a singer below 30 are from.
SQL: SELECT country FROM singer WHERE age  >  40 INTERSECT SELECT country FROM singer WHERE age  <  30
Database: concert_singer
Question: Show names for all stadiums except for stadiums having a concert in year 2014.
SQL: SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014
Database: concert_singer
Question: What are the names of all stadiums that did not have a concert in 2014?
SQL: SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  =  2014
Database: concert_singer
Question: Show the name and theme for all concerts and the number of singers in each concert.
SQL: SELECT T2.concert_name ,  T2.theme ,  count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id  =  T2.concert_id GROUP BY T2.concert_id
Database: concert_singer
Question: What are the names , themes , and number of singers for every concert ?
SQL: select t2.concert_name ,  t2.theme ,  count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id  =  t2.concert_id group by t2.concert_id
Database: concert_singer
Question: List singer names and number of concerts for each singer.
SQL: SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id
Database: concert_singer
Question: What are the names of the singers and number of concerts for each person?
SQL: SELECT T2.name ,  count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id GROUP BY T2.singer_id
Database: concert_singer
Question: List all singer names in concerts in year 2014.
SQL: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014
Database: concert_singer
Question: What are the names of the singers who performed in a concert in 2014?
SQL: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id  =  T2.singer_id JOIN concert AS T3 ON T1.concert_id  =  T3.concert_id WHERE T3.year  =  2014
Database: concert_singer
Question: what is the name and nation of the singer who have a song having 'Hey' in its name?
SQL: SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'
Database: concert_singer
Question: What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?
SQL: SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'
Database: concert_singer
Question: Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.
SQL: SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015
Database: concert_singer
Question: What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?
SQL: SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2014 INTERSECT SELECT T2.name ,  T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.Year  =  2015
Database: concert_singer
Question: Find the number of concerts happened in the stadium with the highest capacity .
SQL: select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)
Database: concert_singer
Question: What are the number of concerts that occurred in the stadium with the largest capacity ?
SQL: select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)
Database: pets_1
Question: Find the number of pets whose weight is heavier than 10.
SQL: SELECT count(*) FROM pets WHERE weight  >  10
Database: pets_1
Question: How many pets have a greater weight than 10?
SQL: SELECT count(*) FROM pets WHERE weight  >  10
Database: pets_1
Question: Find the weight of the youngest dog.
SQL: SELECT weight FROM pets ORDER BY pet_age LIMIT 1
Database: pets_1
Question: How much does the youngest dog weigh?
SQL: SELECT weight FROM pets ORDER BY pet_age LIMIT 1
Database: pets_1
Question: Find the maximum weight for each type of pet. List the maximum weight and pet type.
SQL: SELECT max(weight) ,  petType FROM pets GROUP BY petType
Database: pets_1
Question: List the maximum weight and type for each type of pet.
SQL: SELECT max(weight) ,  petType FROM pets GROUP BY petType
Database: pets_1
Question: Find number of pets owned by students who are older than 20.
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: How many pets are owned by students that have an age greater than 20?
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: Find the number of dog pets that are raised by female students (with sex F).
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'
Database: pets_1
Question: How many dog pets are raised by female students?
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'
Database: pets_1
Question: Find the number of distinct type of pets.
SQL: SELECT count(DISTINCT pettype) FROM pets
Database: pets_1
Question: How many different types of pet are there?
SQL: SELECT count(DISTINCT pettype) FROM pets
Database: pets_1
Question: Find the first name of students who have cat or dog pet.
SQL: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'
Database: pets_1
Question: What are the first names of every student who has a cat or dog as a pet?
SQL: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' OR T3.pettype  =  'dog'
Database: pets_1
Question: Find the first name of students who have both cat and dog pets .
SQL: select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid join pets as t3 on t3.petid  =  t2.petid where t3.pettype  =  'dog'
Database: pets_1
Question: What are the students' first names who have both cats and dogs as pets?
SQL: SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog'
Database: pets_1
Question: Find the major and age of students who do not have a cat pet.
SQL: SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')
Database: pets_1
Question: What major is every student who does not own a cat as a pet, and also how old are they?
SQL: SELECT major ,  age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')
Database: pets_1
Question: Find the id of students who do not have a cat pet.
SQL: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'
Database: pets_1
Question: What are the ids of the students who do not own cats as pets?
SQL: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'
Database: pets_1
Question: Find the first name and age of students who have a dog but do not have a cat as a pet.
SQL: SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')
Database: pets_1
Question: What is the first name of every student who has a dog but does not have a cat?
SQL: SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')
Database: pets_1
Question: Find the type and weight of the youngest pet.
SQL: SELECT pettype ,  weight FROM pets ORDER BY pet_age LIMIT 1
Database: pets_1
Question: What type of pet is the youngest animal, and how much does it weigh?
SQL: SELECT pettype ,  weight FROM pets ORDER BY pet_age LIMIT 1
Database: pets_1
Question: Find the id and weight of all pets whose age is older than 1.
SQL: SELECT petid ,  weight FROM pets WHERE pet_age  >  1
Database: pets_1
Question: What is the id and weight of every pet who is older than 1?
SQL: SELECT petid ,  weight FROM pets WHERE pet_age  >  1
Database: pets_1
Question: Find the average and maximum age for each type of pet.
SQL: SELECT avg(pet_age) ,  max(pet_age) ,  pettype FROM pets GROUP BY pettype
Database: pets_1
Question: What is the average and maximum age for each pet type?
SQL: SELECT avg(pet_age) ,  max(pet_age) ,  pettype FROM pets GROUP BY pettype
Database: pets_1
Question: Find the average weight for each pet type.
SQL: SELECT avg(weight) ,  pettype FROM pets GROUP BY pettype
Database: pets_1
Question: What is the average weight for each type of pet?
SQL: SELECT avg(weight) ,  pettype FROM pets GROUP BY pettype
Database: pets_1
Question: Find the first name and age of students who have a pet.
SQL: SELECT DISTINCT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid
Database: pets_1
Question: What are the different first names and ages of the students who do have pets?
SQL: SELECT DISTINCT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid
Database: pets_1
Question: Find the id of the pet owned by student whose last name is ‘Smith’.
SQL: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.Lname  =  'Smith'
Database: pets_1
Question: What is the id of the pet owned by the student whose last name is 'Smith'?
SQL: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.Lname  =  'Smith'
Database: pets_1
Question: Find the number of pets for each student who has any pet and student id.
SQL: SELECT count(*) ,  T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid GROUP BY T1.stuid
Database: pets_1
Question: For students who have pets , how many pets does each student have ? list their ids instead of names .
SQL: select count(*) ,  t1.stuid from student as t1 join has_pet as t2 on t1.stuid  =  t2.stuid group by t1.stuid
Database: pets_1
Question: Find the first name and gender of student who have more than one pet.
SQL: SELECT T1.fname ,  T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid GROUP BY T1.stuid HAVING count(*)  >  1
Database: pets_1
Question: What is the first name and gender of the all the students who have more than one pet?
SQL: SELECT T1.fname ,  T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid GROUP BY T1.stuid HAVING count(*)  >  1
Database: pets_1
Question: Find the last name of the student who has a cat that is age 3.
SQL: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pet_age  =  3 AND T3.pettype  =  'cat'
Database: pets_1
Question: What is the last name of the student who has a cat that is 3 years old?
SQL: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pet_age  =  3 AND T3.pettype  =  'cat'
Database: pets_1
Question: Find the average age of students who do not have any pet .
SQL: select avg(age) from student where stuid not in (select stuid from has_pet)
Database: pets_1
Question: What is the average age for all students who do not own any pets ?
SQL: select avg(age) from student where stuid not in (select stuid from has_pet)
Database: car_1
Question: Find the model of the car whose weight is below the average weight.
SQL: SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.Weight  <  (SELECT avg(Weight) FROM CARS_DATA)
Database: car_1
Question: What is the model for the car with a weight smaller than the average?
SQL: SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.Weight  <  (SELECT avg(Weight) FROM CARS_DATA)
Database: car_1
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
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
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
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
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
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: flight_2
Question: Which country does Airline "JetBlue Airways" belong to?
SQL: SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question: What country is Jetblue Airways affiliated with?
SQL: SELECT Country FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question: What is the abbreviation of Airline "JetBlue Airways"?
SQL: SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question: Which abbreviation corresponds to Jetblue Airways?
SQL: SELECT Abbreviation FROM AIRLINES WHERE Airline  =  "JetBlue Airways"
Database: flight_2
Question: List all airline names and their abbreviations in "USA".
SQL: SELECT Airline ,  Abbreviation FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2
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
Question: List the airport code and name in the city of Anthony.
SQL: SELECT AirportCode ,  AirportName FROM AIRPORTS WHERE city  =  "Anthony"
Database: flight_2
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
Question: How many airlines do we have?
SQL: SELECT count(*) FROM AIRLINES
Database: flight_2
Question: What is the total number of airlines?
SQL: SELECT count(*) FROM AIRLINES
Database: flight_2
Question: How many airports do we have?
SQL: SELECT count(*) FROM AIRPORTS
Database: flight_2
Question: Return the number of  airports.
SQL: SELECT count(*) FROM AIRPORTS
Database: flight_2
Question: How many flights do we have?
SQL: SELECT count(*) FROM FLIGHTS
Database: flight_2
Question: Return the number of flights.
SQL: SELECT count(*) FROM FLIGHTS
Database: flight_2
Question: Which airline has abbreviation 'UAL'?
SQL: SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Database: flight_2
Question: Give the airline with abbreviation 'UAL'.
SQL: SELECT Airline FROM AIRLINES WHERE Abbreviation  =  "UAL"
Database: flight_2
Question: How many airlines are from USA?
SQL: SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2
Question: Return the number of airlines in the USA.
SQL: SELECT count(*) FROM AIRLINES WHERE Country  =  "USA"
Database: flight_2
Question: Which city and country is the Alton airport at?
SQL: SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Database: flight_2
Question: Give the city and country for the Alton airport.
SQL: SELECT City ,  Country FROM AIRPORTS WHERE AirportName  =  "Alton"
Database: flight_2
Question: What is the airport name for airport 'AKO'?
SQL: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Database: flight_2
Question: Return the name of the airport with code 'AKO'.
SQL: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
Database: flight_2
Question: What are airport names at City 'Aberdeen'?
SQL: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Database: flight_2
Question: What are the names of airports in Aberdeen?
SQL: SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen"
Database: flight_2
Question: How many flights depart from 'APG'?
SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question: Count the number of flights departing from 'APG'.
SQL: SELECT count(*) FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question: How many flights have destination ATO?
SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Database: flight_2
Question: Count the number of flights into ATO.
SQL: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
Database: flight_2
Question: How many flights depart from City Aberdeen?
SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question: Return the number of flights departing from Aberdeen.
SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question: How many flights arriving in Aberdeen city?
SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question: Return the number of flights arriving in Aberdeen.
SQL: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
Database: flight_2
Question: How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
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: How many flights fly from Aberdeen to Ashley?
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: How many flights does airline 'JetBlue Airways' have?
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: Give the number of Jetblue Airways flights.
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: How many 'United Airlines' flights go to Airport 'ASY'?
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: Count the number of United Airlines flights arriving in ASY Airport.
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: How many 'United Airlines' flights depart from Airport 'AHD'?
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: Return the number of United Airlines flights leaving from AHD Airport.
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: How many United Airlines flights go to City 'Aberdeen'?
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: Count the number of United Airlines flights that arrive in Aberdeen.
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: Which city has most number of arriving flights?
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: Which city has the most frequent destination airport?
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: Which city has most number of departing flights?
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: Which city is the most frequent source airport?
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: What is the code of airport that has the highest number of flights?
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: What is the airport code of the airport with the most flights?
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: What is the code of airport that has fewest number of flights?
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: Give the code of the airport with the least flights.
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: Which airline has most number of flights?
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: What airline serves the most flights?
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: Find the abbreviation and country of the airline that has fewest number of flights?
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: What is the abbreviation of the airilne has the fewest flights and what country is it in?
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: What are airlines that have some flight departing from airport 'AHD'?
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: Which airlines have a flight with source airport AHD?
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: What are airlines that have flights arriving at airport 'AHD'?
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: Which airlines have a flight with destination airport AHD?
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: Find all airlines that have flights from both airports 'APG' and 'CVO'.
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: Which airlines have departing flights from both APG and CVO airports?
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: Find all airlines that have flights from airport 'CVO' but not from 'APG'.
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: Which airlines have departures from CVO but not from APG airports?
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: Find all airlines that have at least 10 flights.
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: Which airlines have at least 10 flights?
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: Find all airlines that have fewer than 200 flights.
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: Which airlines have less than 200 flights?
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: What are flight numbers of Airline "United Airlines"?
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: Which flight numbers correspond to United Airlines flights?
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: What are flight numbers of flights departing from Airport "APG"?
SQL: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question: Give the flight numbers of flights leaving from APG.
SQL: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"
Database: flight_2
Question: What are flight numbers of flights arriving at Airport "APG"?
SQL: SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"
Database: flight_2
Question: Give the flight numbers of flights landing at APG.
SQL: SELECT FlightNo FROM FLIGHTS WHERE DestAirport  =  "APG"
Database: flight_2
Question: What are flight numbers of flights departing from City "Aberdeen "?
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: Give the flight numbers of flights leaving from Aberdeen.
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: What are flight numbers of flights arriving at City "Aberdeen"?
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: Give the flight numbers of flights arriving in Aberdeen.
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: Find the number of flights landing in the city of Aberdeen or Abilene.
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: How many flights land in Aberdeen or Abilene?
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: Find the name of airports which do not have any flight in and out.
SQL: SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
Database: flight_2
Question: Which airports do not have departing or arriving flights?
SQL: SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
Database: employee_hire_evaluation
Question: How many employees are there?
SQL: SELECT count(*) FROM employee
Database: employee_hire_evaluation
Question: Count the number of employees
SQL: SELECT count(*) FROM employee
Database: employee_hire_evaluation
Question: Sort employee names by their age in ascending order.
SQL: SELECT name FROM employee ORDER BY age
Database: employee_hire_evaluation
Question: List the names of employees and sort in ascending order of age.
SQL: SELECT name FROM employee ORDER BY age
Database: employee_hire_evaluation
Question: What is the number of employees from each city?
SQL: SELECT count(*) ,  city FROM employee GROUP BY city
Database: employee_hire_evaluation
Question: Count the number of employees for each city.
SQL: SELECT count(*) ,  city FROM employee GROUP BY city
Database: employee_hire_evaluation
Question: Which cities do more than one employee under age 30 come from?
SQL: SELECT city FROM employee WHERE age  <  30 GROUP BY city HAVING count(*)  >  1
Database: employee_hire_evaluation
Question: Find the cities that have more than one employee under age 30.
SQL: SELECT city FROM employee WHERE age  <  30 GROUP BY city HAVING count(*)  >  1
Database: employee_hire_evaluation
Question: Find the number of shops in each location.
SQL: SELECT count(*) ,  LOCATION FROM shop GROUP BY LOCATION
Database: employee_hire_evaluation
Question: How many shops are there in each location?
SQL: SELECT count(*) ,  LOCATION FROM shop GROUP BY LOCATION
Database: employee_hire_evaluation
Question: Find the manager name and district of the shop whose number of products is the largest.
SQL: SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1
Database: employee_hire_evaluation
Question: What are the manager name and district of the shop that sells the largest number of products?
SQL: SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1
Database: employee_hire_evaluation
Question: find the minimum and maximum number of products of all stores.
SQL: SELECT min(Number_products) ,  max(Number_products) FROM shop
Database: employee_hire_evaluation
Question: What are the minimum and maximum number of products across all the shops?
SQL: SELECT min(Number_products) ,  max(Number_products) FROM shop
Database: employee_hire_evaluation
Question: Return the name, location and district of all shops in descending order of number of products.
SQL: SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC
Database: employee_hire_evaluation
Question: Sort all the shops by number products in descending order, and return the name, location and district of each shop.
SQL: SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC
Database: employee_hire_evaluation
Question: Find the names of stores whose number products is more than the average number of products.
SQL: SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)
Database: employee_hire_evaluation
Question: Which shops' number products is above the average? Give me the shop names.
SQL: SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)
Database: employee_hire_evaluation
Question: find the name of employee who was awarded the most times in the evaluation.
SQL: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1
Database: employee_hire_evaluation
Question: Which employee received the most awards in evaluations? Give me the employee name.
SQL: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1
Database: employee_hire_evaluation
Question: Find the name of the employee who got the highest one time bonus.
SQL: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1
Database: employee_hire_evaluation
Question: Which employee received the biggest bonus? Give me the employee name.
SQL: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1
Database: employee_hire_evaluation
Question: Find the names of employees who never won any award in the evaluation.
SQL: SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)
Database: employee_hire_evaluation
Question: What are the names of the employees who never received any evaluation?
SQL: SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)
Database: employee_hire_evaluation
Question: What is the name of the shop that is hiring the largest number of employees?
SQL: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1
Database: employee_hire_evaluation
Question: Which shop has the most employees? Give me the shop name.
SQL: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1
Database: employee_hire_evaluation
Question: Find the name of the shops that do not hire any employee.
SQL: SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)
Database: employee_hire_evaluation
Question: Which shops run with no employees? Find the shop names
SQL: SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)
Database: employee_hire_evaluation
Question: Find the number of employees hired in each shop; show the shop name as well.
SQL: SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name
Database: employee_hire_evaluation
Question: For each shop, return the number of employees working there and the name of the shop.
SQL: SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name
Database: employee_hire_evaluation
Question: What is total bonus given in all evaluations?
SQL: SELECT sum(bonus) FROM evaluation
Database: employee_hire_evaluation
Question: Find the total amount of bonus given in all the evaluations.
SQL: SELECT sum(bonus) FROM evaluation
Database: employee_hire_evaluation
Question: Give me all the information about hiring.
SQL: SELECT * FROM hiring
Database: employee_hire_evaluation
Question: What is all the information about hiring?
SQL: SELECT * FROM hiring
Database: employee_hire_evaluation
Question: Which district has both stores with less than 3000 products and stores with more than 10000 products?
SQL: SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000
Database: employee_hire_evaluation
Question: Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
SQL: SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000
Database: employee_hire_evaluation
Question: How many different store locations are there?
SQL: SELECT count(DISTINCT LOCATION) FROM shop
Database: employee_hire_evaluation
Question: Count the number of distinct store locations.
SQL: SELECT count(DISTINCT LOCATION) FROM shop
Database: cre_Doc_Template_Mgt
Question: How many documents do we have?
SQL: SELECT count(*) FROM Documents
Database: cre_Doc_Template_Mgt
Question: Count the number of documents.
SQL: SELECT count(*) FROM Documents
Database: cre_Doc_Template_Mgt
Question: List document IDs, document names, and document descriptions for all documents.
SQL: SELECT document_id ,  document_name ,  document_description FROM Documents
Database: cre_Doc_Template_Mgt
Question: What are the ids, names, and descriptions for all documents?
SQL: SELECT document_id ,  document_name ,  document_description FROM Documents
Database: cre_Doc_Template_Mgt
Question: What is the document name and template id for document with description with the letter 'w' in it?
SQL: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"
Database: cre_Doc_Template_Mgt
Question: Return the names and template ids for documents that contain the letter w in their description.
SQL: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"
Database: cre_Doc_Template_Mgt
Question: What is the document id, template id and description for document named "Robbin CV"?
SQL: SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"
Database: cre_Doc_Template_Mgt
Question: Return the document id, template id, and description for the document with the name Robbin CV.
SQL: SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"
Database: cre_Doc_Template_Mgt
Question: How many different templates do all document use?
SQL: SELECT count(DISTINCT template_id) FROM Documents
Database: cre_Doc_Template_Mgt
Question: Count the number of different templates used for documents.
SQL: SELECT count(DISTINCT template_id) FROM Documents
Database: cre_Doc_Template_Mgt
Question: How many documents are using the template with type code 'PPT'?
SQL: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'
Database: cre_Doc_Template_Mgt
Question: Count the number of documents that use the PPT template type.
SQL: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'
Database: cre_Doc_Template_Mgt
Question: Show all template ids and number of documents using each template.
SQL: SELECT template_id ,  count(*) FROM Documents GROUP BY template_id
Database: cre_Doc_Template_Mgt
Question: What are all different template ids used for documents, and how many times were each of them used?
SQL: SELECT template_id ,  count(*) FROM Documents GROUP BY template_id
Database: cre_Doc_Template_Mgt
Question: What is the id and type code for the template used by the most documents?
SQL: SELECT T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Return the id and type code of the template that is used for the greatest number of documents.
SQL: SELECT T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question: Show ids for all templates that are used by more than one document.
SQL: SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1
Database: cre_Doc_Template_Mgt
Question: What are the template ids of any templates used in more than a single document?
SQL: SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1
Database: cre_Doc_Template_Mgt
Question: Show ids for all templates not used by any document.
SQL: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
Database: cre_Doc_Template_Mgt
Question: What are the ids for templates that are not used in any documents?
SQL: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
Database: cre_Doc_Template_Mgt
Question: How many templates do we have?
SQL: SELECT count(*) FROM Templates
Database: cre_Doc_Template_Mgt
Question: Count the number of templates.
SQL: SELECT count(*) FROM Templates
Database: cre_Doc_Template_Mgt
Question: Show template ids, version numbers, and template type codes for all templates.
SQL: SELECT template_id ,  version_number ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: What are the ids, version numbers, and type codes for each template?
SQL: SELECT template_id ,  version_number ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: Show all distinct template type codes for all templates.
SQL: SELECT DISTINCT template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: What are the different template type codes?
SQL: SELECT DISTINCT template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question: What are the ids of templates with template type code PP or PPT?
SQL: SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"
Database: cre_Doc_Template_Mgt
Question: Return the ids of templates that have the code PP or PPT.
SQL: SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"