cnatale/presto-athena-txt-2-sql huggingface dataset:
How many aircrafts are there?
Additional table information: table: aircraft
SQL: SELECT COUNT(*) FROM aircraft
What is the number of aircraft?
Additional table information: table: aircraft
SQL: SELECT COUNT(*) FROM aircraft
List the description of all aircrafts.
Additional table information: table: aircraft
SQL: SELECT Description FROM aircraft
What are the descriptions for the aircrafts?
Additional table information: table: aircraft
SQL: SELECT Description FROM aircraft
What is the average number of international passengers of all airports?
Additional table information: table: aircraft
SQL: SELECT AVG(International_Passengers) FROM airport
What is the average number of international passengers for an airport?
Additional table information: table: aircraft
SQL: SELECT AVG(International_Passengers) FROM airport
What are the number of international and domestic passengers of the airport named London 'Heathrow'?
Additional table information: table: aircraft
SQL: SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'
How many international and domestic passengers are there in the airport London Heathrow?
Additional table information: table: aircraft
SQL: SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'
What are the total number of Domestic Passengers of airports that contain the word 'London'.
Additional table information: table: aircraft
SQL: SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'
What are the total number of domestic passengers at all London airports?
Additional table information: table: aircraft
SQL: SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'
What are the maximum and minimum number of transit passengers of all aiports.
Additional table information: table: aircraft
SQL: SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport
What is the maximum and mininum number of transit passengers for all airports?
Additional table information: table: aircraft
SQL: SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport
What are the name of pilots aged 25 or older?
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot WHERE Age >= 25
what is the name of every pilot who is at least 25 years old?
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot WHERE Age >= 25
List all pilot names in ascending alphabetical order.
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST
What are the names of the pilots in alphabetical order?
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST
List names of all pilot aged 30 or younger in descending alphabetical order.
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
What are the names of all pilots 30 years old or young in descending alphabetical order?
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC
Please show the names of aircrafts associated with airport with name 'London Gatwick'.
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'
What are the names of all the aircrafts associated with London Gatwick airport?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'
Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000
What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'?
Additional table information: table: aircraft
SQL: SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22'
What is the average total number of passengers for all airports that the aircraft 'Robinson R-22' visits?
Additional table information: table: aircraft
SQL: SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22'
Please list the location and the winning aircraft name.
Additional table information: table: aircraft
SQL: SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
What is the location and name of the winning aircraft?
Additional table information: table: aircraft
SQL: SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft
List the name of the aircraft that has been named winning aircraft the most number of times.
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the aircraft that has won an award the most?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
List the names of aircrafts and the number of times it won matches.
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
For each aircraft that has won an award, what is its name and how many time has it won?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
List names of all pilot in descending order of age.
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot ORDER BY Age DESC
What are the names of all pilots listed by descending age?
Additional table information: table: aircraft
SQL: SELECT Name FROM pilot ORDER BY Age DESC
List the names of aircrafts and that won matches at least twice.
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2
What are the names of all aircrafts that have won a match at least twice?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2
List the names of aircrafts and that did not win any match.
Additional table information: table: aircraft
SQL: SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)
What are the names of all aicrafts that have never won any match?
Additional table information: table: aircraft
SQL: SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)
Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick'
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'
What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?
Additional table information: table: aircraft
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'
Show all information on the airport that has the largest number of international passengers.
Additional table information: table: aircraft
SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
What is all the information on the airport with the largest number of international passengers?
Additional table information: table: aircraft
SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.
Additional table information: table: aircraft
SQL: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1
What is the name and age of the pilot younger than 30 who has won the most number of times?
Additional table information: table: aircraft
SQL: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1
what is the name and age of the youngest winning pilot?
Additional table information: table: aircraft
SQL: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1
How old is the youngest winning pilot and what is their name?
Additional table information: table: aircraft
SQL: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1
find the name of pilots who did not win the matches held in the country of Australia.
Additional table information: table: aircraft
SQL: SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
What are the names of the pilots that have not won any matches in Australia?
Additional table information: table: aircraft
SQL: SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
How many residents does each property have? List property id and resident count.
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.property_id, COUNT(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id
What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?
Additional table information: table: local_govt_and_lot
SQL: SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'
How many services has each resident requested? List the resident id, details, and the count in descending order of the count.
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC
What is the maximum number that a certain service is provided? List the service id, details and number.
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1
List the id and type of each thing, and the details of the organization that owns it.
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id
What are the id and details of the customers who have at least 3 events?
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3
What is each customer's move in date, and the corresponding customer id and details?
Additional table information: table: local_govt_and_lot
SQL: SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id
Which events have the number of notes between one and three? List the event id and the property id.
Additional table information: table: local_govt_and_lot
SQL: SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3
What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'
Additional table information: table: local_govt_and_lot
SQL: SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'
How many distinct locations have the things with service detail 'Unsatisfied' been located in?
Additional table information: table: local_govt_and_lot
SQL: SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'
How many different status codes of things are there?
Additional table information: table: local_govt_and_lot
SQL: SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
Which organizations are not a parent organization of others? List the organization id.
Additional table information: table: local_govt_and_lot
SQL: SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
When is the last day any resident moved in?
Additional table information: table: local_govt_and_lot
SQL: SELECT MAX(date_moved_in) FROM Residents
What are the resident details containing the substring 'Miss'?
Additional table information: table: local_govt_and_lot
SQL: SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
List the customer event id and the corresponding move in date and property id.
Additional table information: table: local_govt_and_lot
SQL: SELECT customer_event_id, date_moved_in, property_id FROM customer_events
How many customers did not have any event?
Additional table information: table: local_govt_and_lot
SQL: SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)
What are the distinct move in dates of the residents?
Additional table information: table: local_govt_and_lot
SQL: SELECT DISTINCT date_moved_in FROM residents
How many schools are there?
Additional table information: table: school_player
SQL: SELECT COUNT(*) FROM school
Count the number of schools.
Additional table information: table: school_player
SQL: SELECT COUNT(*) FROM school
List the locations of schools in ascending order of enrollment.
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST
What is the list of school locations sorted in ascending order of school enrollment?
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST
List the locations of schools in descending order of founded year.
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
What is the list of school locations sorted in descending order of school foundation year?
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
What are the enrollments of schools whose denomination is not 'Catholic'?
Additional table information: table: school_player
SQL: SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'
List the enrollment for each school that does not have 'Catholic' as denomination.
Additional table information: table: school_player
SQL: SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'
What is the average enrollment of schools?
Additional table information: table: school_player
SQL: SELECT AVG(Enrollment) FROM school
Take the average of the school enrollment.
Additional table information: table: school_player
SQL: SELECT AVG(Enrollment) FROM school
What are the teams of the players, sorted in ascending alphabetical order?
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Team ASC NULLS FIRST
Find the team of each player and sort them in ascending alphabetical order.
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Team ASC NULLS FIRST
How many different positions of players are there?
Additional table information: table: school_player
SQL: SELECT COUNT(DISTINCT POSITION) FROM player
Count the number of distinct player positions.
Additional table information: table: school_player
SQL: SELECT COUNT(DISTINCT POSITION) FROM player
Find the team of the player of the highest age.
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Which team has the oldest player?
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
List the teams of the players with the top 5 largest ages.
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
What are the teams that have the 5 oldest players?
Additional table information: table: school_player
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
For each player, show the team and the location of school they belong to.
Additional table information: table: school_player
SQL: SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
What are the team and the location of school each player belongs to?
Additional table information: table: school_player
SQL: SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
Show the locations of schools that have more than 1 player.
Additional table information: table: school_player
SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1
Which schools have more than 1 player? Give me the school locations.
Additional table information: table: school_player
SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1
Show the denomination of the school that has the most players.
Additional table information: table: school_player
SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
What is the denomination of the school the most players belong to?
Additional table information: table: school_player
SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
Show locations and nicknames of schools.
Additional table information: table: school_player
SQL: SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID
What are the location and nickname of each school?
Additional table information: table: school_player
SQL: SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID
Please show different denominations and the corresponding number of schools.
Additional table information: table: school_player
SQL: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination
For each denomination, return the denomination and the count of schools with that denomination.
Additional table information: table: school_player
SQL: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination
Please show different denominations and the corresponding number of schools in descending order.
Additional table information: table: school_player
SQL: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.
Additional table information: table: school_player
SQL: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
List the school color of the school that has the largest enrollment.
Additional table information: table: school_player
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
What is the school color of the school with the largest enrollment?
Additional table information: table: school_player
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
List the locations of schools that do not have any player.
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)
Which schools do not have any player? Give me the school locations.
Additional table information: table: school_player
SQL: SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)
Show the denomination shared by schools founded before 1890 and schools founded after 1900
Additional table information: table: school_player
SQL: SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
What are the denominations used by both schools founded before 1890 and schools founded  after 1900?
Additional table information: table: school_player
SQL: SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
Show the nicknames of schools that are not in division 1.
Additional table information: table: school_player
SQL: SELECT Nickname FROM school_details WHERE Division <> 'Division 1'
What are the nicknames of schools whose division is not 1?
Additional table information: table: school_player
SQL: SELECT Nickname FROM school_details WHERE Division <> 'Division 1'
Show the denomination shared by more than one school.
Additional table information: table: school_player
SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1
What are the denomination more than one school have?
Additional table information: table: school_player
SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1
Find all the distinct district names ordered by city area in descending.
Additional table information: table: store_product
SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
What are the different district names in order of descending city area?
Additional table information: table: store_product
SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
Find the list of page size which have more than 3 product listed
Additional table information: table: store_product
SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3
What is the maximum page size for everything that has more than 3 products listed?
Additional table information: table: store_product
SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3
Find the name and population of district with population between 200000 and 2000000
Additional table information: table: store_product
SQL: SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?
Additional table information: table: store_product
SQL: SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
Find the name all districts with city area greater than 10 or population larger than 100000
Additional table information: table: store_product
SQL: SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000
What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?
Additional table information: table: store_product
SQL: SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000
Which district has the largest population?
Additional table information: table: store_product
SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
What is the name of the district with the most residents?
Additional table information: table: store_product
SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
Which district has the least area?
Additional table information: table: store_product
SQL: SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1
What is the name of the district with the smallest area?
Additional table information: table: store_product
SQL: SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1
Find the total population of the top 3 districts with the largest area.
Additional table information: table: store_product
SQL: SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3
What is the total number of residents for the districts with the 3 largest areas?
Additional table information: table: store_product
SQL: SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3
Find all types of store and number of them.
Additional table information: table: store_product
SQL: SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE
For each type of store, how many of them are there?
Additional table information: table: store_product
SQL: SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE
Find the names of all stores in Khanewal District.
Additional table information: table: store_product
SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District'
What are the names of all the stores located in Khanewal District?
Additional table information: table: store_product
SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District'
Find all the stores in the district with the most population.
Additional table information: table: store_product
SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
What are the names of all the stores in the largest district by population?
Additional table information: table: store_product
SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
Which city is the headquarter of the store named 'Blackville' in?
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville'
What city is the headquarter of the store Blackville?
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville'
Find the number of stores in each city.
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city
How many stores are headquarted in each city?
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city
Find the city with the most number of stores.
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1
What is the city with the most number of flagship stores?
Additional table information: table: store_product
SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1
What is the average pages per minute color?
Additional table information: table: store_product
SQL: SELECT AVG(pages_per_minute_color) FROM product
What is the average number of pages per minute color?
Additional table information: table: store_product
SQL: SELECT AVG(pages_per_minute_color) FROM product
What products are available at store named 'Miramichi'?
Additional table information: table: store_product
SQL: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi'
What products are sold at the store named Miramichi?
Additional table information: table: store_product
SQL: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi'
Find products with max page size as 'A4' and pages per minute color smaller than 5.
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5
What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5
Find products with max page size as 'A4' or pages per minute color smaller than 5.
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5
What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5
Find all the product whose name contains the word 'Scanner'.
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE product LIKE '%Scanner%'
What are all of the products whose name includes the substring 'Scanner'?
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE product LIKE '%Scanner%'
Find the most prominent max page size among all the products.
Additional table information: table: store_product
SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1
What is the most common maximum page size?
Additional table information: table: store_product
SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1
Find the name of the products that are not using the most frequently-used max page size.
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)
What are the names of all products that are not the most frequently-used maximum page size?
Additional table information: table: store_product
SQL: SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)
Find the total population of the districts where the area is bigger than the average city area.
Additional table information: table: store_product
SQL: SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)
What is the total population for all the districts that have an area larger tahn the average city area?
Additional table information: table: store_product
SQL: SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)
Find the names of districts where have both city mall and village store type stores.
Additional table information: table: store_product
SQL: SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store'
What are the names of the districts that have both mall and village store style shops?
Additional table information: table: store_product
SQL: SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store'
What is the total enrollment number of all colleges?
Additional table information: table: soccer_2
SQL: SELECT SUM(enr) FROM College
How many students are enrolled in college?
Additional table information: table: soccer_2
SQL: SELECT SUM(enr) FROM College
What is the average enrollment number?
Additional table information: table: soccer_2
SQL: SELECT AVG(enr) FROM College
How many students, on average, does each college have enrolled?
Additional table information: table: soccer_2
SQL: SELECT AVG(enr) FROM College
How many colleges in total?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM College
How many different colleges are there?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM College
How many players have more than 1000 hours of training?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM Player WHERE HS > 1000
How many different players trained for more than 1000 hours?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM Player WHERE HS > 1000
How many colleges has more than 15000 students?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM College WHERE enr > 15000
What is the number of colleges with a student population greater than 15000?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM College WHERE enr > 15000
What is the average training hours of all players?
Additional table information: table: soccer_2
SQL: SELECT AVG(HS) FROM Player
How many hours do the players train on average?
Additional table information: table: soccer_2
SQL: SELECT AVG(HS) FROM Player
Find the name and training hours of players whose hours are below 1500.
Additional table information: table: soccer_2
SQL: SELECT pName, HS FROM Player WHERE HS < 1500
What are the names and number of hours spent training for each player who trains for less than 1500 hours?
Additional table information: table: soccer_2
SQL: SELECT pName, HS FROM Player WHERE HS < 1500
How many different colleges do attend the tryout test?
Additional table information: table: soccer_2
SQL: SELECT COUNT(DISTINCT cName) FROM tryout
How many different colleges were represented at tryouts?
Additional table information: table: soccer_2
SQL: SELECT COUNT(DISTINCT cName) FROM tryout
What are the unique types of player positions in the tryout?
Additional table information: table: soccer_2
SQL: SELECT COUNT(DISTINCT pPos) FROM tryout
What are the different types of player positions?
Additional table information: table: soccer_2
SQL: SELECT COUNT(DISTINCT pPos) FROM tryout
How many students got accepted after the tryout?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM tryout WHERE decision = 'yes'
How many students received a yes from tryouts?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM tryout WHERE decision = 'yes'
How many students whose are playing the role of goalie?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'
What is the number of students playing as a goalie?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'
Find the max, average and min training hours of all players.
Additional table information: table: soccer_2
SQL: SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player
What is the average, maximum, and minimum for the number of hours spent training?
Additional table information: table: soccer_2
SQL: SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player
What is average enrollment of colleges in the state FL?
Additional table information: table: soccer_2
SQL: SELECT AVG(enr) FROM College WHERE state = 'FL'
What is average number of students enrolled in Florida colleges?
Additional table information: table: soccer_2
SQL: SELECT AVG(enr) FROM College WHERE state = 'FL'
What are the names of players whose training hours is between 500 and 1500?
Additional table information: table: soccer_2
SQL: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
What are the names of players who train between 500 and 1500 hours?
Additional table information: table: soccer_2
SQL: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
Find the players whose names contain letter 'a'.
Additional table information: table: soccer_2
SQL: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Who are the players that have names containing the letter a?
Additional table information: table: soccer_2
SQL: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.
Additional table information: table: soccer_2
SQL: SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'
What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?
Additional table information: table: soccer_2
SQL: SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'
List all information about college sorted by enrollment number in the ascending order.
Additional table information: table: soccer_2
SQL: SELECT * FROM College ORDER BY enr NULLS FIRST
What information do you have on colleges sorted by increasing enrollment numbers?
Additional table information: table: soccer_2
SQL: SELECT * FROM College ORDER BY enr NULLS FIRST
List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.
Additional table information: table: soccer_2
SQL: SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST
What is the name of every college in alphabetical order that has more than 18000 students enrolled?
Additional table information: table: soccer_2
SQL: SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST
Find the name of players whose card is yes in the descending order of training hours.
Additional table information: table: soccer_2
SQL: SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
What are the name of the players who received a card in descending order of the hours of training?
Additional table information: table: soccer_2
SQL: SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
Find the name of different colleges involved in the tryout in alphabetical order.
Additional table information: table: soccer_2
SQL: SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST
What are the different names of the colleges involved in the tryout in alphabetical order?
Additional table information: table: soccer_2
SQL: SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST
Which position is most popular among players in the tryout?
Additional table information: table: soccer_2
SQL: SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1
What was the most popular position at tryouts?
Additional table information: table: soccer_2
SQL: SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1
Find the number of students who participate in the tryout for each college ordered by descending count.
Additional table information: table: soccer_2
SQL: SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC
How many students participated in tryouts for each college by descennding count?
Additional table information: table: soccer_2
SQL: SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC
What is minimum hours of the students playing in different position?
Additional table information: table: soccer_2
SQL: SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos
For each position, what is the minimum time students spent practicing?
Additional table information: table: soccer_2
SQL: SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos
What are the names of schools with the top 3 largest size?
Additional table information: table: soccer_2
SQL: SELECT cName FROM college ORDER BY enr DESC LIMIT 3
What are the names of the schools with the top 3 largest class sizes?
Additional table information: table: soccer_2
SQL: SELECT cName FROM college ORDER BY enr DESC LIMIT 3
What is the name of school that has the smallest enrollment in each state?
Additional table information: table: soccer_2
SQL: SELECT cName, state, MIN(enr) FROM college GROUP BY state
What is the name of the school with smallest enrollment size per state?
Additional table information: table: soccer_2
SQL: SELECT cName, state, MIN(enr) FROM college GROUP BY state
Find the states where have some college students in tryout.
Additional table information: table: soccer_2
SQL: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName
What are the different states that have students trying out?
Additional table information: table: soccer_2
SQL: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName
Find the states where have some college students in tryout and their decisions are yes.
Additional table information: table: soccer_2
SQL: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
What are the different states that had students successfully try out?
Additional table information: table: soccer_2
SQL: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
Find the name and college of students whose decisions are yes in the tryout.
Additional table information: table: soccer_2
SQL: SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?
Additional table information: table: soccer_2
SQL: SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Find the name of all students who were in the tryout sorted in alphabetic order.
Additional table information: table: soccer_2
SQL: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST
What are the names of all students who tried out in alphabetical order?
Additional table information: table: soccer_2
SQL: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST
Find the name and hours of the students whose tryout decision is yes.
Additional table information: table: soccer_2
SQL: SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What are the names and hours spent practicing of every student who received a yes at tryouts?
Additional table information: table: soccer_2
SQL: SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Find the states of the colleges that have students in the tryout who played in striker position.
Additional table information: table: soccer_2
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'
What are the states of the colleges where students who tried out for the striker position attend?
Additional table information: table: soccer_2
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'
Find the names of the students who are in the position of striker and got a yes tryout decision.
Additional table information: table: soccer_2
SQL: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'
What are the names of all students who successfully tried out for the position of striker?
Additional table information: table: soccer_2
SQL: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'
Find the state of the college which player Charles is attending.
Additional table information: table: soccer_2
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'
In which state is the college that Charles attends?
Additional table information: table: soccer_2
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'
Find the average and maximum hours for the students whose tryout decision is yes.
Additional table information: table: soccer_2
SQL: SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
What is the average and maximum number of hours students who made the team practiced?
Additional table information: table: soccer_2
SQL: SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Find the average hours for the students whose tryout decision is no.
Additional table information: table: soccer_2
SQL: SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
What is the average number of hours spent practicing for students who got rejected?
Additional table information: table: soccer_2
SQL: SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'
What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?
Additional table information: table: soccer_2
SQL: SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos
For each position, what is the maximum number of  hours for students who spent more than 1000 hours training?
Additional table information: table: soccer_2
SQL: SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos
Which colleges do the tryout players whose name starts with letter D go to?
Additional table information: table: soccer_2
SQL: SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'