db_name
stringclasses
146 values
prompt
stringlengths
310
4.81k
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # Which district has the largest population? # ### SQL: # # SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # Which district has the least area? # ### SQL: # # SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # Find all types of store and number of them. # ### SQL: # # SELECT TYPE , count(*) FROM store GROUP BY TYPE # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # For each type of store, how many of them are there? # ### SQL: # # SELECT TYPE , count(*) FROM store GROUP BY TYPE # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # What is the average pages per minute color? # ### SQL: # # SELECT avg(pages_per_minute_color) FROM product # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # What is the average number of pages per minute color? # ### SQL: # # SELECT avg(pages_per_minute_color) FROM product # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # Find all the product whose name contains the word "Scanner". # ### SQL: # # SELECT product FROM product WHERE product LIKE "%Scanner%" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### Question: # # What are all of the products whose name includes the substring "Scanner"? # ### SQL: # # SELECT product FROM product WHERE product LIKE "%Scanner%" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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 # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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) # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
store_product
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # product ( product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface ) # store ( Store_ID, Store_Name, Type, Area_size, Number_of_product_category, Ranking ) # district ( District_ID, District_name, Headquartered_City, City_Population, City_Area ) # store_product ( Store_ID, Product_ID ) # store_district ( Store_ID, District_ID ) # # store_product.Store_ID can be joined with store.Store_ID # store_district.District_ID can be joined with district.District_ID # store_district.Store_ID can be joined with store.Store_ID # ### 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" # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is the total enrollment number of all colleges? # ### SQL: # # SELECT sum(enr) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many students are enrolled in college? # ### SQL: # # SELECT sum(enr) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is the average enrollment number? # ### SQL: # # SELECT avg(enr) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many students, on average, does each college have enrolled? # ### SQL: # # SELECT avg(enr) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many colleges in total? # ### SQL: # # SELECT count(*) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many different colleges are there? # ### SQL: # # SELECT count(*) FROM College # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many players have more than 1000 hours of training? # ### SQL: # # SELECT count(*) FROM Player WHERE HS > 1000 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many different players trained for more than 1000 hours? # ### SQL: # # SELECT count(*) FROM Player WHERE HS > 1000 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many colleges has more than 15000 students? # ### SQL: # # SELECT count(*) FROM College WHERE enr > 15000 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is the number of colleges with a student population greater than 15000? # ### SQL: # # SELECT count(*) FROM College WHERE enr > 15000 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is the average training hours of all players? # ### SQL: # # SELECT avg(HS) FROM Player # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many hours do the players train on average? # ### SQL: # # SELECT avg(HS) FROM Player # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Find the name and training hours of players whose hours are below 1500. # ### SQL: # # SELECT pName , HS FROM Player WHERE HS < 1500 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many different colleges do attend the tryout test? # ### SQL: # # SELECT count(DISTINCT cName) FROM tryout # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many different colleges were represented at tryouts? # ### SQL: # # SELECT count(DISTINCT cName) FROM tryout # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What are the unique types of player positions in the tryout? # ### SQL: # # SELECT count(DISTINCT pPos) FROM tryout # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What are the different types of player positions? # ### SQL: # # SELECT count(DISTINCT pPos) FROM tryout # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many students got accepted after the tryout? # ### SQL: # # SELECT count(*) FROM tryout WHERE decision = 'yes' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many students received a yes from tryouts? # ### SQL: # # SELECT count(*) FROM tryout WHERE decision = 'yes' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # How many students whose are playing the role of goalie? # ### SQL: # # SELECT count(*) FROM tryout WHERE pPos = 'goalie' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is the number of students playing as a goalie? # ### SQL: # # SELECT count(*) FROM tryout WHERE pPos = 'goalie' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Find the max, average and min training hours of all players. # ### SQL: # # SELECT avg(HS) , max(HS) , min(HS) FROM Player # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is average enrollment of colleges in the state FL? # ### SQL: # # SELECT avg(enr) FROM College WHERE state = 'FL' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What is average number of students enrolled in Florida colleges? # ### SQL: # # SELECT avg(enr) FROM College WHERE state = 'FL' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Find the players whose names contain letter 'a'. # ### SQL: # # SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Who are the players that have names containing the letter a? # ### SQL: # # SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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" # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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" # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # List all information about college sorted by enrollment number in the ascending order. # ### SQL: # # SELECT * FROM College ORDER BY enr # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What information do you have on colleges sorted by increasing enrollment numbers? # ### SQL: # # SELECT * FROM College ORDER BY enr # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Find the name of different colleges involved in the tryout in alphabetical order. # ### SQL: # # SELECT DISTINCT cName FROM tryout ORDER BY cName # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What was the most popular position at tryouts? # ### SQL: # # SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What are the names of schools with the top 3 largest size? # ### SQL: # # SELECT cName FROM college ORDER BY enr DESC LIMIT 3 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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 # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### 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' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What are the different states that had students successfully try out? # ### SQL: # # SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # Find the name and college of students whose decisions are yes in the tryout. # ### SQL: # # SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' # ### End.
soccer_2
### Complete SQL query only and with no explanation ### SQL tables followed by foreign key information: # # College ( cName, state, enr ) # Player ( pID, pName, yCard, HS ) # Tryout ( pID, cName, pPos, decision ) # # Tryout.cName can be joined with College.cName # Tryout.pID can be joined with Player.pID # ### Question: # # What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges? # ### SQL: # # SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' # ### End.