minktn/spider-data huggingface dataset:
Database: department_store
Question: Give the ids and names of products with price lower than 600 or higher than 900.
SQL: SELECT product_id ,  product_name FROM products WHERE product_price  <  600 OR product_price  >  900
Database: department_store
Question: Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
SQL: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased)  >  50000 OR avg(total_amount_purchased)  <  30000
Database: department_store
Question: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?
SQL: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased)  >  50000 OR avg(total_amount_purchased)  <  30000
Database: department_store
Question: What are the average amount purchased and value purchased for the supplier who supplies the most products.
SQL: SELECT avg(total_amount_purchased) ,  avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id  =  (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
Database: department_store
Question: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.
SQL: SELECT avg(total_amount_purchased) ,  avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id  =  (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
Database: department_store
Question: What is the largest and smallest customer codes?
SQL: SELECT max(customer_code) ,  min(customer_code) FROM Customers
Database: department_store
Question: Return the maximum and minimum customer codes.
SQL: SELECT max(customer_code) ,  min(customer_code) FROM Customers
Database: department_store
Question: List the names of all the distinct customers who bought a keyboard.
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "keyboard"
Database: department_store
Question: What are the distinct names of customers who have purchased a keyboard?
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "keyboard"
Database: department_store
Question: List the names and phone numbers of all the distinct suppliers who supply red jeans.
SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "red jeans"
Database: department_store
Question: What are the distinct names and phone numbers for suppliers who have red jeans?
SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "red jeans"
Database: department_store
Question: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?
SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
Database: department_store
Question: Give the maximum and minimum product prices for each product type, grouped and ordered by product type.
SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
Database: department_store
Question: List the order id, customer id for orders in Cancelled status, ordered by their order dates.
SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date
Database: department_store
Question: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?
SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date
Database: department_store
Question: Find the names of products that were bought by at least two distinct customers.
SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
Database: department_store
Question: What are the distinct names of products purchased by at least two different customers?
SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
Database: department_store
Question: Find the names of customers who have bought by at least three distinct products.
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
Database: department_store
Question: What are the distinct names of customers who have purchased at least three different products?
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
Database: department_store
Question: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Sales Person" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Clerical Staff"
Database: department_store
Question: What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Sales Person" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Clerical Staff"
Database: department_store
Question: Find the id and name of customers whose address contains WY state and do not use credit card for payment.
SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
Database: department_store
Question: What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?
SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
Database: department_store
Question: Find the average price of all product clothes.
SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'
Database: department_store
Question: What is the average price of clothes?
SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'
Database: department_store
Question: Find the name of the most expensive hardware product.
SQL: SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1
Database: department_store
Question: What is the name of the hardware product with the greatest price?
SQL: SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1
Database: aircraft
Question: How many aircrafts are there?
SQL: SELECT count(*) FROM aircraft
Database: aircraft
Question: What is the number of aircraft?
SQL: SELECT count(*) FROM aircraft
Database: aircraft
Question: List the description of all aircrafts.
SQL: SELECT Description FROM aircraft
Database: aircraft
Question: What are the descriptions for the aircrafts?
SQL: SELECT Description FROM aircraft
Database: aircraft
Question: What is the average number of international passengers of all airports?
SQL: SELECT avg(International_Passengers) FROM airport
Database: aircraft
Question: What is the average number of international passengers for an airport?
SQL: SELECT avg(International_Passengers) FROM airport
Database: aircraft
Question: What are the number of international and domestic passengers of the airport named London "Heathrow"?
SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "London Heathrow"
Database: aircraft
Question: How many international and domestic passengers are there in the airport London Heathrow?
SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "London Heathrow"
Database: aircraft
Question: What are the total number of Domestic Passengers of airports that contain the word "London".
SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
Database: aircraft
Question: What are the total number of domestic passengers at all London airports?
SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
Database: aircraft
Question: What are the maximum and minimum number of transit passengers of all aiports.
SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
Database: aircraft
Question: What is the maximum and mininum number of transit passengers for all airports?
SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
Database: aircraft
Question: What are the name of pilots aged 25 or older?
SQL: SELECT Name FROM pilot WHERE Age  >=  25
Database: aircraft
Question: what is the name of every pilot who is at least 25 years old?
SQL: SELECT Name FROM pilot WHERE Age  >=  25
Database: aircraft
Question: List all pilot names in ascending alphabetical order.
SQL: SELECT Name FROM pilot ORDER BY Name ASC
Database: aircraft
Question: What are the names of the pilots in alphabetical order?
SQL: SELECT Name FROM pilot ORDER BY Name ASC
Database: aircraft
Question: List names of all pilot aged 30 or younger in descending alphabetical order.
SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
Database: aircraft
Question: What are the names of all pilots 30 years old or young in descending alphabetical order?
SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
Database: aircraft
Question: Please show the names of aircrafts associated with airport with name "London Gatwick".
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"
Database: aircraft
Question: What are the names of all the aircrafts associated with London Gatwick airport?
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"
Database: aircraft
Question: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.
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
Database: aircraft
Question: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?
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
Database: aircraft
Question: What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?
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"
Database: aircraft
Question: What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits?
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"
Database: aircraft
Question: Please list the location and the winning aircraft name.
SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Database: aircraft
Question: What is the location and name of the winning aircraft?
SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Database: aircraft
Question: List the name of the aircraft that has been named winning aircraft the most number of times.
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
Database: aircraft
Question: What is the name of the aircraft that has won an award the most?
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
Database: aircraft
Question: List the names of aircrafts and the number of times it won matches.
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
Database: aircraft
Question: For each aircraft that has won an award, what is its name and how many time has it won?
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
Database: aircraft
Question: List names of all pilot in descending order of age.
SQL: SELECT Name FROM pilot ORDER BY Age DESC
Database: aircraft
Question: What are the names of all pilots listed by descending age?
SQL: SELECT Name FROM pilot ORDER BY Age DESC
Database: aircraft
Question: List the names of aircrafts and that won matches at least twice.
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
Database: aircraft
Question: What are the names of all aircrafts that have won a match at least twice?
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
Database: aircraft
Question: List the names of aircrafts and that did not win any match.
SQL: SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
Database: aircraft
Question: What are the names of all aicrafts that have never won any match?
SQL: SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
Database: aircraft
Question: Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick"
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"
Database: aircraft
Question: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?
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"
Database: aircraft
Question: Show all information on the airport that has the largest number of international passengers.
SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
Database: aircraft
Question: What is all the information on the airport with the largest number of international passengers?
SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
Database: aircraft
Question: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.
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
Database: aircraft
Question: What is the name and age of the pilot younger than 30 who has won the most number of times?
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
Database: aircraft
Question: what is the name and age of the youngest winning pilot?
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 LIMIT 1
Database: aircraft
Question: How old is the youngest winning pilot and what is their name?
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 LIMIT 1
Database: aircraft
Question: find the name of pilots who did not win the matches held in the country of Australia.
SQL: SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot  FROM MATCH WHERE country  =  'Australia')
Database: aircraft
Question: What are the names of the pilots that have not won any matches in Australia?
SQL: SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot  FROM MATCH WHERE country  =  'Australia')
Database: local_govt_and_lot
Question: How many residents does each property have? List property id and resident count.
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
Database: local_govt_and_lot
Question: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?
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'
Database: local_govt_and_lot
Question: How many services has each resident requested? List the resident id, details, and the count in descending order of the count.
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
Database: local_govt_and_lot
Question: What is the maximum number that a certain service is provided? List the service id, details and number.
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
Database: local_govt_and_lot
Question: List the id and type of each thing, and the details of the organization that owns it.
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
Database: local_govt_and_lot
Question: What are the id and details of the customers who have at least 3 events?
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
Database: local_govt_and_lot
Question: What is each customer's move in date, and the corresponding customer id and details?
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
Database: local_govt_and_lot
Question: Which events have the number of notes between one and three? List the event id and the property id.
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
Database: local_govt_and_lot
Question: 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'
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'
Database: local_govt_and_lot
Question: How many distinct locations have the things with service detail 'Unsatisfied' been located in?
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'
Database: local_govt_and_lot
Question: How many different status codes of things are there?
SQL: SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
Database: local_govt_and_lot
Question: Which organizations are not a parent organization of others? List the organization id.
SQL: SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
Database: local_govt_and_lot
Question: When is the last day any resident moved in?
SQL: SELECT max(date_moved_in) FROM Residents
Database: local_govt_and_lot
Question: What are the resident details containing the substring 'Miss'?
SQL: SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
Database: local_govt_and_lot
Question: List the customer event id and the corresponding move in date and property id.
SQL: SELECT customer_event_id ,  date_moved_in ,  property_id FROM customer_events
Database: local_govt_and_lot
Question: How many customers did not have any event?
SQL: SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )
Database: local_govt_and_lot
Question: What are the distinct move in dates of the residents?
SQL: SELECT DISTINCT date_moved_in FROM residents
Database: school_player
Question: How many schools are there?
SQL: SELECT count(*) FROM school
Database: school_player
Question: Count the number of schools.
SQL: SELECT count(*) FROM school
Database: school_player
Question: List the locations of schools in ascending order of enrollment.
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
Database: school_player
Question: What is the list of school locations sorted in ascending order of school enrollment?
SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
Database: school_player
Question: List the locations of schools in descending order of founded year.
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
Database: school_player
Question: What is the list of school locations sorted in descending order of school foundation year?
SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
Database: school_player
Question: What are the enrollments of schools whose denomination is not "Catholic"?
SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
Database: school_player
Question: List the enrollment for each school that does not have "Catholic" as denomination.
SQL: SELECT Enrollment FROM school WHERE Denomination != "Catholic"
Database: school_player
Question: What is the average enrollment of schools?
SQL: SELECT avg(Enrollment) FROM school
Database: school_player
Question: Take the average of the school enrollment.
SQL: SELECT avg(Enrollment) FROM school
Database: school_player
Question: What are the teams of the players, sorted in ascending alphabetical order?
SQL: SELECT Team FROM player ORDER BY Team ASC
Database: school_player
Question: Find the team of each player and sort them in ascending alphabetical order.
SQL: SELECT Team FROM player ORDER BY Team ASC
Database: school_player
Question: How many different positions of players are there?
SQL: SELECT count(DISTINCT POSITION) FROM player
Database: school_player
Question: Count the number of distinct player positions.
SQL: SELECT count(DISTINCT POSITION) FROM player
Database: school_player
Question: Find the team of the player of the highest age.
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Database: school_player
Question: Which team has the oldest player?
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
Database: school_player
Question: List the teams of the players with the top 5 largest ages.
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
Database: school_player
Question: What are the teams that have the 5 oldest players?
SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
Database: school_player
Question: For each player, show the team and the location of school they belong to.
SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
Database: school_player
Question: What are the team and the location of school each player belongs to?
SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
Database: school_player
Question: Show the locations of schools that have more than 1 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
Database: school_player
Question: Which schools have more than 1 player? Give me the school locations.
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
Database: school_player
Question: Show the denomination of the school that has the most players.
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
Database: school_player
Question: What is the denomination of the school the most players belong to?
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
Database: school_player
Question: Show locations and nicknames of schools.
SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
Database: school_player
Question: What are the location and nickname of each school?
SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
Database: school_player
Question: Please show different denominations and the corresponding number of schools.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
Database: school_player
Question: For each denomination, return the denomination and the count of schools with that denomination.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
Database: school_player
Question: Please show different denominations and the corresponding number of schools in descending order.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Database: school_player
Question: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.
SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Database: school_player
Question: List the school color of the school that has the largest enrollment.
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
Database: school_player
Question: What is the school color of the school with the largest enrollment?
SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
Database: school_player
Question: List the locations of schools that do not have any player.
SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
Database: school_player
Question: Which schools do not have any player? Give me the school locations.
SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
Database: school_player
Question: Show the denomination shared by schools founded before 1890 and schools founded after 1900
SQL: SELECT Denomination FROM school WHERE Founded  <  1890 INTERSECT SELECT Denomination FROM school WHERE Founded  >  1900
Database: school_player
Question: What are the denominations used by both schools founded before 1890 and schools founded  after 1900?
SQL: SELECT Denomination FROM school WHERE Founded  <  1890 INTERSECT SELECT Denomination FROM school WHERE Founded  >  1900
Database: school_player
Question: Show the nicknames of schools that are not in division 1.
SQL: SELECT Nickname FROM school_details WHERE Division != "Division 1"
Database: school_player
Question: What are the nicknames of schools whose division is not 1?
SQL: SELECT Nickname FROM school_details WHERE Division != "Division 1"
Database: school_player
Question: Show the denomination shared by more than one school.
SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
Database: school_player
Question: What are the denomination more than one school have?
SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
Database: store_product
Question: Find all the distinct district names ordered by city area in descending.
SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
Database: store_product
Question: What are the different district names in order of descending city area?
SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
Database: store_product
Question: Find the list of page size which have more than 3 product listed
SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*)  >  3
Database: store_product
Question: What is the maximum page size for everything that has more than 3 products listed?
SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*)  >  3
Database: store_product
Question: Find the name and population of district with population between 200000 and 2000000
SQL: SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
Database: store_product
Question: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?
SQL: SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
Database: store_product
Question: Find the name all districts with city area greater than 10 or population larger than 100000
SQL: SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000
Database: store_product
Question: What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?
SQL: SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000
Database: store_product
Question: Which district has the largest population?
SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
Database: store_product
Question: What is the name of the district with the most residents?
SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
Database: store_product
Question: Which district has the least area?
SQL: SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
Database: store_product
Question: What is the name of the district with the smallest area?
SQL: SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
Database: store_product
Question: Find the total population of the top 3 districts with the largest area.
SQL: SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
Database: store_product
Question: What is the total number of residents for the districts with the 3 largest areas?
SQL: SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
Database: store_product
Question: Find all types of store and number of them.
SQL: SELECT TYPE ,  count(*) FROM store GROUP BY TYPE
Database: store_product
Question: For each type of store, how many of them are there?
SQL: SELECT TYPE ,  count(*) FROM store GROUP BY TYPE
Database: store_product
Question: Find the names of all stores in Khanewal District.
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"
Database: store_product
Question: What are the names of all the stores located in Khanewal District?
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"
Database: store_product
Question: Find all the stores in the district with the most population.
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)
Database: store_product
Question: What are the names of all the stores in the largest district by population?
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)
Database: store_product
Question: Which city is the headquarter of the store named "Blackville" in?
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"
Database: store_product
Question: What city is the headquarter of the store Blackville?
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"
Database: store_product
Question: Find the number of stores in each city.
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
Database: store_product
Question: How many stores are headquarted in each city?
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
Database: store_product
Question: Find the city with the most number of stores.
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
Database: store_product
Question: What is the city with the most number of flagship stores?
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
Database: store_product
Question: What is the average pages per minute color?
SQL: SELECT avg(pages_per_minute_color) FROM product
Database: store_product
Question: What is the average number of pages per minute color?
SQL: SELECT avg(pages_per_minute_color) FROM product
Database: store_product
Question: What products are available at store named "Miramichi"?
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"
Database: store_product
Question: What products are sold at the store named Miramichi?
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"
Database: store_product
Question: Find products with max page size as "A4" and pages per minute color smaller than 5.
SQL: SELECT product FROM product WHERE max_page_size  =  "A4" AND pages_per_minute_color  <  5
Database: store_product
Question: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?
SQL: SELECT product FROM product WHERE max_page_size  =  "A4" AND pages_per_minute_color  <  5
Database: store_product
Question: Find products with max page size as "A4" or pages per minute color smaller than 5.
SQL: SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5
Database: store_product
Question: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?
SQL: SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5
Database: store_product
Question: Find all the product whose name contains the word "Scanner".
SQL: SELECT product FROM product WHERE product LIKE "%Scanner%"
Database: store_product
Question: What are all of the products whose name includes the substring "Scanner"?
SQL: SELECT product FROM product WHERE product LIKE "%Scanner%"
Database: store_product
Question: Find the most prominent max page size among all the products.
SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
Database: store_product
Question: What is the most common maximum page size?
SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
Database: store_product
Question: Find the name of the products that are not using the most frequently-used max page size.
SQL: SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
Database: store_product
Question: What are the names of all products that are not the most frequently-used maximum page size?
SQL: SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
Database: store_product
Question: Find the total population of the districts where the area is bigger than the average city area.
SQL: SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)
Database: store_product
Question: What is the total population for all the districts that have an area larger tahn the average city area?
SQL: SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)
Database: store_product
Question: Find the names of districts where have both city mall and village store type stores.
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"
Database: store_product
Question: What are the names of the districts that have both mall and village store style shops?
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"
Database: soccer_2
Question: What is the total enrollment number of all colleges?
SQL: SELECT sum(enr) FROM College
Database: soccer_2
Question: How many students are enrolled in college?
SQL: SELECT sum(enr) FROM College
Database: soccer_2
Question: What is the average enrollment number?
SQL: SELECT avg(enr) FROM College
Database: soccer_2
Question: How many students, on average, does each college have enrolled?
SQL: SELECT avg(enr) FROM College
Database: soccer_2
Question: How many colleges in total?
SQL: SELECT count(*) FROM College
Database: soccer_2
Question: How many different colleges are there?
SQL: SELECT count(*) FROM College
Database: soccer_2
Question: How many players have more than 1000 hours of training?
SQL: SELECT count(*) FROM Player WHERE HS  >  1000
Database: soccer_2
Question: How many different players trained for more than 1000 hours?
SQL: SELECT count(*) FROM Player WHERE HS  >  1000
Database: soccer_2
Question: How many colleges has more than 15000 students?
SQL: SELECT count(*) FROM College WHERE enr  >  15000
Database: soccer_2
Question: What is the number of colleges with a student population greater than 15000?
SQL: SELECT count(*) FROM College WHERE enr  >  15000
Database: soccer_2
Question: What is the average training hours of all players?
SQL: SELECT avg(HS) FROM Player
Database: soccer_2
Question: How many hours do the players train on average?
SQL: SELECT avg(HS) FROM Player
Database: soccer_2
Question: Find the name and training hours of players whose hours are below 1500.
SQL: SELECT pName ,  HS FROM Player WHERE HS  <  1500
Database: soccer_2
Question: What are the names and number of hours spent training for each player who trains for less than 1500 hours?
SQL: SELECT pName ,  HS FROM Player WHERE HS  <  1500
Database: soccer_2
Question: How many different colleges do attend the tryout test?
SQL: SELECT count(DISTINCT cName) FROM tryout
Database: soccer_2
Question: How many different colleges were represented at tryouts?
SQL: SELECT count(DISTINCT cName) FROM tryout
Database: soccer_2
Question: What are the unique types of player positions in the tryout?
SQL: SELECT count(DISTINCT pPos) FROM tryout
Database: soccer_2
Question: What are the different types of player positions?
SQL: SELECT count(DISTINCT pPos) FROM tryout
Database: soccer_2
Question: How many students got accepted after the tryout?
SQL: SELECT count(*) FROM tryout WHERE decision  =  'yes'
Database: soccer_2
Question: How many students received a yes from tryouts?
SQL: SELECT count(*) FROM tryout WHERE decision  =  'yes'
Database: soccer_2
Question: How many students whose are playing the role of goalie?
SQL: SELECT count(*) FROM tryout WHERE pPos  =  'goalie'
Database: soccer_2
Question: What is the number of students playing as a goalie?
SQL: SELECT count(*) FROM tryout WHERE pPos  =  'goalie'
Database: soccer_2
Question: Find the max, average and min training hours of all players.
SQL: SELECT avg(HS) ,  max(HS) ,  min(HS) FROM Player
Database: soccer_2
Question: What is the average, maximum, and minimum for the number of hours spent training?
SQL: SELECT avg(HS) ,  max(HS) ,  min(HS) FROM Player
Database: soccer_2
Question: What is average enrollment of colleges in the state FL?
SQL: SELECT avg(enr) FROM College WHERE state  =  'FL'
Database: soccer_2
Question: What is average number of students enrolled in Florida colleges?
SQL: SELECT avg(enr) FROM College WHERE state  =  'FL'
Database: soccer_2
Question: What are the names of players whose training hours is between 500 and 1500?
SQL: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
Database: soccer_2
Question: What are the names of players who train between 500 and 1500 hours?
SQL: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
Database: soccer_2
Question: Find the players whose names contain letter 'a'.
SQL: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Database: soccer_2
Question: Who are the players that have names containing the letter a?
SQL: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'
Database: soccer_2
Question: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.
SQL: SELECT cName ,  enr FROM College WHERE enr  >  10000 AND state = "LA"
Database: soccer_2
Question: What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?
SQL: SELECT cName ,  enr FROM College WHERE enr  >  10000 AND state = "LA"
Database: soccer_2
Question: List all information about college sorted by enrollment number in the ascending order.
SQL: SELECT * FROM College ORDER BY enr
Database: soccer_2
Question: What information do you have on colleges sorted by increasing enrollment numbers?
SQL: SELECT * FROM College ORDER BY enr
Database: soccer_2
Question: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.
SQL: SELECT cName FROM College WHERE enr  >  18000 ORDER BY cName
Database: soccer_2
Question: What is the name of every college in alphabetical order that has more than 18000 students enrolled?
SQL: SELECT cName FROM College WHERE enr  >  18000 ORDER BY cName
Database: soccer_2
Question: Find the name of players whose card is yes in the descending order of training hours.
SQL: SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC
Database: soccer_2
Question: What are the name of the players who received a card in descending order of the hours of training?
SQL: SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC
Database: soccer_2
Question: Find the name of different colleges involved in the tryout in alphabetical order.
SQL: SELECT DISTINCT cName FROM tryout ORDER BY cName
Database: soccer_2
Question: What are the different names of the colleges involved in the tryout in alphabetical order?
SQL: SELECT DISTINCT cName FROM tryout ORDER BY cName
Database: soccer_2
Question: Which position is most popular among players in the tryout?
SQL: SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1
Database: soccer_2
Question: What was the most popular position at tryouts?
SQL: SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1
Database: soccer_2
Question: Find the number of students who participate in the tryout for each college ordered by descending count.
SQL: SELECT count(*) ,  cName FROM tryout GROUP BY cName ORDER BY count(*) DESC
Database: soccer_2
Question: How many students participated in tryouts for each college by descennding count?
SQL: SELECT count(*) ,  cName FROM tryout GROUP BY cName ORDER BY count(*) DESC
Database: soccer_2
Question: What is minimum hours of the students playing in different position?
SQL: SELECT min(T2.HS) ,   T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID GROUP BY T1.pPos
Database: soccer_2
Question: For each position, what is the minimum time students spent practicing?
SQL: SELECT min(T2.HS) ,   T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID GROUP BY T1.pPos
Database: soccer_2
Question: What are the names of schools with the top 3 largest size?
SQL: SELECT cName FROM college ORDER BY enr DESC LIMIT 3
Database: soccer_2
Question: What are the names of the schools with the top 3 largest class sizes?
SQL: SELECT cName FROM college ORDER BY enr DESC LIMIT 3
Database: soccer_2
Question: What is the name of school that has the smallest enrollment in each state?
SQL: SELECT cName ,  state ,  min(enr) FROM college GROUP BY state
Database: soccer_2
Question: What is the name of the school with smallest enrollment size per state?
SQL: SELECT cName ,  state ,  min(enr) FROM college GROUP BY state
Database: soccer_2
Question: Find the states where have some college students in tryout.
SQL: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName
Database: soccer_2
Question: What are the different states that have students trying out?
SQL: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName
Database: soccer_2
Question: Find the states where have some college students in tryout and their decisions are yes.
SQL: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes'