target-benchmark/spider-queries huggingface dataset:
Database: car_racing (tables: country, driver)
Question: Find the countries where no driver come from.
SQL: SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver)
Database: car_racing (tables: country, driver)
Question: Which countries do not have any drivers?
SQL: SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver)
Database: car_racing (tables: team, team_driver)
Question: What are the manager and sponsor of the team that has the most drivers?
SQL: SELECT t1.manager ,  t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1
Database: car_racing (tables: team, team_driver)
Question: Find the manager and sponsor of the team that has the most drivers.
SQL: SELECT t1.manager ,  t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1
Database: car_racing (tables: team, team_driver)
Question: What are the manager and car owner of the team that has at least 2 drivers?
SQL: SELECT t1.manager ,  t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id HAVING count(*)  >=  2
Database: car_racing (tables: team, team_driver)
Question: Find the team with two or more drivers and return the the manager and car owner of the team.
SQL: SELECT t1.manager ,  t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id HAVING count(*)  >=  2
Database: institution_sports (tables: institution)
Question: How many institutions are there?
SQL: SELECT count(*) FROM institution
Database: institution_sports (tables: institution)
Question: Count the number of institutions.
SQL: SELECT count(*) FROM institution
Database: institution_sports (tables: institution)
Question: List the names of institutions in ascending alphabetical order.
SQL: SELECT Name FROM institution ORDER BY Name ASC
Database: institution_sports (tables: institution)
Question: What are the names of institutions, ordered alphabetically?
SQL: SELECT Name FROM institution ORDER BY Name ASC
Database: institution_sports (tables: institution)
Question: List the names of institutions in ascending order of founded year.
SQL: SELECT Name FROM institution ORDER BY Founded ASC
Database: institution_sports (tables: institution)
Question: What are the names of institutions, ordered by the years in which they were founded?
SQL: SELECT Name FROM institution ORDER BY Founded ASC
Database: institution_sports (tables: institution)
Question: What are the cities and provinces of institutions?
SQL: SELECT City ,  Province FROM institution
Database: institution_sports (tables: institution)
Question: Return the cities and provinces of institutions.
SQL: SELECT City ,  Province FROM institution
Database: institution_sports (tables: institution)
Question: What are the maximum and minimum enrollment of all institutions?
SQL: SELECT max(Enrollment) ,  min(Enrollment) FROM institution
Database: institution_sports (tables: institution)
Question: Return the maximum and minimum enrollment across all institutions.
SQL: SELECT max(Enrollment) ,  min(Enrollment) FROM institution
Database: institution_sports (tables: institution)
Question: What are the affiliations of institutions that are not in city "Vancouver"?
SQL: SELECT Affiliation FROM institution WHERE City != "Vancouver"
Database: institution_sports (tables: institution)
Question: Return the affiliations of instituions that are not in the city of Vancouver.
SQL: SELECT Affiliation FROM institution WHERE City != "Vancouver"
Database: institution_sports (tables: institution)
Question: What are the stadiums of institutions in descending order of the capacity.
SQL: SELECT Stadium FROM institution ORDER BY Capacity DESC
Database: institution_sports (tables: institution)
Question: Return the stadiums of institutions, ordered by capacity descending.
SQL: SELECT Stadium FROM institution ORDER BY Capacity DESC
Database: institution_sports (tables: institution)
Question: What is the stadium of the institution with the largest enrollment?
SQL: SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1
Database: institution_sports (tables: institution)
Question: Give the stadium of the institution which is the greatest enrollment.
SQL: SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1
Database: institution_sports (tables: championship, institution)
Question: What are the names and nicknames of institutions?
SQL: SELECT T2.Name ,  T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID
Database: institution_sports (tables: championship, institution)
Question: Return the names of institutions, as well as their nicknames.
SQL: SELECT T2.Name ,  T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID
Database: institution_sports (tables: championship, institution)
Question: What is the nickname of the institution with the smallest enrollment?
SQL: SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Enrollment ASC LIMIT 1
Database: institution_sports (tables: championship, institution)
Question: Return the nickname of the institution with the lowest enrollment.
SQL: SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Enrollment ASC LIMIT 1
Database: institution_sports (tables: championship, institution)
Question: List the names of institutions in descending order of the number of championships.
SQL: SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T1.Number_of_Championships DESC
Database: institution_sports (tables: championship, institution)
Question: What are the names of institutions, ordered descending by their number of championships?
SQL: SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T1.Number_of_Championships DESC
Database: institution_sports (tables: championship, institution)
Question: List the names of institutions with at least one championship.
SQL: SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T1.Number_of_Championships  >=  1
Database: institution_sports (tables: championship, institution)
Question: What are the names of institutions that have 1 or more championships?
SQL: SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T1.Number_of_Championships  >=  1
Database: institution_sports (tables: championship, institution)
Question: What is the total number of championship of institution with public affiliation?
SQL: SELECT sum(T1.Number_of_Championships) FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T2.Affiliation  =  "Public"
Database: institution_sports (tables: championship, institution)
Question: Return the total number of championships of institutions that have a Public affiliation.
SQL: SELECT sum(T1.Number_of_Championships) FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T2.Affiliation  =  "Public"
Database: institution_sports (tables: institution)
Question: What are different types of affiliations of institutions and the corresponding number of institutions?
SQL: SELECT Affiliation ,  COUNT(*) FROM institution GROUP BY Affiliation
Database: institution_sports (tables: institution)
Question: How many institutions are there for each type of affiliation?
SQL: SELECT Affiliation ,  COUNT(*) FROM institution GROUP BY Affiliation
Database: institution_sports (tables: institution)
Question: What is the most common type of affiliation for institutions?
SQL: SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1
Database: institution_sports (tables: institution)
Question: Return the most common type of affiliation across all institutions.
SQL: SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1
Database: institution_sports (tables: institution)
Question: In which years were more than one institution founded?
SQL: SELECT Founded ,  COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*)  >  1
Database: institution_sports (tables: institution)
Question: Return the years in which more than 1 institution was founded, as well as the number of institutions founded in each of those.
SQL: SELECT Founded ,  COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*)  >  1
Database: institution_sports (tables: championship, institution)
Question: List the nicknames of institutions in descending order of capacity.
SQL: SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Capacity DESC
Database: institution_sports (tables: championship, institution)
Question: What are the nicknames of institutions, ordered descending by their capacities?
SQL: SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Capacity DESC
Database: institution_sports (tables: institution)
Question: What are the total enrollment of institutions in city `` Vancouver '' or `` Calgary '' ?
SQL: select sum(enrollment) from institution where city  =  "vancouver" or city  =  "calgary"
Database: institution_sports (tables: institution)
Question: Return all the enrollments of institutions in either the city of Vancouver or the city of Calgary .
SQL: select sum(enrollment) from institution where city  =  "vancouver" or city  =  "calgary"
Database: institution_sports (tables: institution)
Question: Show the provinces that have both institutions founded before 1920 and institutions founded after 1950.
SQL: SELECT Province FROM institution WHERE Founded  <  1920 INTERSECT SELECT Province FROM institution WHERE Founded  >  1950
Database: institution_sports (tables: institution)
Question: What are the provinces that have not only institutions founded before 1920, but also institutions founded after 1950?
SQL: SELECT Province FROM institution WHERE Founded  <  1920 INTERSECT SELECT Province FROM institution WHERE Founded  >  1950
Database: institution_sports (tables: institution)
Question: How many distinct provinces are the institutions in?
SQL: SELECT count(DISTINCT Province) FROM institution
Database: institution_sports (tables: institution)
Question: Count the number of different provinces that have institutions.
SQL: SELECT count(DISTINCT Province) FROM institution
Database: warehouse_1 (tables: warehouses)
Question: Select all details of all warehouses.
SQL: SELECT * FROM warehouses
Database: warehouse_1 (tables: warehouses)
Question: What is all the information about the warehouses?
SQL: SELECT * FROM warehouses
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find all different contents stored in New York.
SQL: SELECT DISTINCT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE LOCATION  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are all the different contents stored in boxes in New York?
SQL: SELECT DISTINCT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE LOCATION  =  'New York'
Database: warehouse_1 (tables: boxes)
Question: Select contents of all boxes with a value larger than $150.
SQL: SELECT CONTENTS FROM boxes WHERE Value  >  150
Database: warehouse_1 (tables: boxes)
Question: What are the contents of boxes with value greater than 150?
SQL: SELECT CONTENTS FROM boxes WHERE Value  >  150
Database: warehouse_1 (tables: boxes)
Question: Select the warehouse code and the average value of the boxes in each warehouse.
SQL: SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: What is the average value of boxes for each warehouse?
SQL: SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse
Database: warehouse_1 (tables: boxes)
Question: Find the average and total values of all boxes.
SQL: SELECT avg(value) ,  sum(value) FROM boxes
Database: warehouse_1 (tables: boxes)
Question: What are the average and total values across all boxes?
SQL: SELECT avg(value) ,  sum(value) FROM boxes
Database: warehouse_1 (tables: warehouses)
Question: Find the average and total capacity of all warehouses.
SQL: SELECT avg(capacity) ,  sum(capacity) FROM warehouses
Database: warehouse_1 (tables: warehouses)
Question: What are the average and total capacities across all warehouses?
SQL: SELECT avg(capacity) ,  sum(capacity) FROM warehouses
Database: warehouse_1 (tables: boxes)
Question: Find the average and maximum value for each different content.
SQL: SELECT avg(value) ,  max(value) ,  CONTENTS FROM boxes GROUP BY CONTENTS
Database: warehouse_1 (tables: boxes)
Question: What are the average and maximum values for each type of content in boxes?
SQL: SELECT avg(value) ,  max(value) ,  CONTENTS FROM boxes GROUP BY CONTENTS
Database: warehouse_1 (tables: boxes)
Question: Find the content that has the highest total values in all boxes.
SQL: SELECT CONTENTS FROM boxes ORDER BY value DESC LIMIT 1
Database: warehouse_1 (tables: boxes)
Question: What is the content with the greatest value across all boxes?
SQL: SELECT CONTENTS FROM boxes ORDER BY value DESC LIMIT 1
Database: warehouse_1 (tables: boxes)
Question: Select the average value of all the boxes.
SQL: SELECT avg(value) FROM boxes
Database: warehouse_1 (tables: boxes)
Question: What is the average value of boxes?
SQL: SELECT avg(value) FROM boxes
Database: warehouse_1 (tables: boxes)
Question: Select all distinct contents in all the boxes.
SQL: SELECT DISTINCT CONTENTS FROM boxes
Database: warehouse_1 (tables: boxes)
Question: What are the different contents in boxes?
SQL: SELECT DISTINCT CONTENTS FROM boxes
Database: warehouse_1 (tables: boxes)
Question: Find the number of all distinct contents in all the boxes.
SQL: SELECT count(DISTINCT CONTENTS) FROM boxes
Database: warehouse_1 (tables: boxes)
Question: How many different contents are stored in boxes?
SQL: SELECT count(DISTINCT CONTENTS) FROM boxes
Database: warehouse_1 (tables: warehouses)
Question: Find all distinct locations of warehouses.
SQL: SELECT count(DISTINCT LOCATION) FROM warehouses
Database: warehouse_1 (tables: warehouses)
Question: What are the different locations of warehouses?
SQL: SELECT count(DISTINCT LOCATION) FROM warehouses
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the code of boxes that are stored at the warehouses located at Chicago or New York.
SQL: SELECT T1.code FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the codes of boxes stored in warehouses in either Chicago or New York?
SQL: SELECT T1.code FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the total value of boxes in the warehouses located at Chicago or New York.
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What is the total value of boxes located in Chicago or New York?
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find all contents present in warehouses located in Chicago and those located in New York.
SQL: SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the contents that are stored in both Chicago and New York.
SQL: SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the type of contents that are not in the warehouses located at New York.
SQL: SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What types of contents cannot be found in warehouses in New York?
SQL: SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the location of the warehouses which have contents Rocks but not Scissors.
SQL: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the locations of warehouses that have boxes containing Rocks but not Scissors?
SQL: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'
Database: warehouse_1 (tables: boxes)
Question: Find the warehouses which store contents Rocks or Scissors.
SQL: SELECT DISTINCT warehouse FROM boxes WHERE CONTENTS  =  'Rocks' OR CONTENTS  =  'Scissors'
Database: warehouse_1 (tables: boxes)
Question: What are the distinct warehouses that have boxes with Rocks or Scissors as contents?
SQL: SELECT DISTINCT warehouse FROM boxes WHERE CONTENTS  =  'Rocks' OR CONTENTS  =  'Scissors'
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the location of the warehouses which store contents Rocks and Scissors.
SQL: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'
Database: warehouse_1 (tables: boxes, warehouses)
Question: What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept?
SQL: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'
Database: warehouse_1 (tables: boxes)
Question: List the code and contents of all boxes sorted by their values.
SQL: SELECT code ,  CONTENTS FROM boxes ORDER BY value
Database: warehouse_1 (tables: boxes)
Question: What are the codes and corresponding contents of all the boxes, ordered by their values?
SQL: SELECT code ,  CONTENTS FROM boxes ORDER BY value
Database: warehouse_1 (tables: boxes)
Question: Find the code and contents of the box with the lowest value.
SQL: SELECT code ,  CONTENTS FROM boxes ORDER BY value LIMIT 1
Database: warehouse_1 (tables: boxes)
Question: What is the code and contents for the box that has the smallest value?
SQL: SELECT code ,  CONTENTS FROM boxes ORDER BY value LIMIT 1
Database: warehouse_1 (tables: boxes)
Question: Find the unique contents of all boxes whose value is higher than the average value of all boxes.
SQL: SELECT DISTINCT CONTENTS FROM boxes WHERE value  >  (SELECT avg(value) FROM boxes)
Database: warehouse_1 (tables: boxes)
Question: What are the different contents of boxes for which the value is higher than the average value across all boxes?
SQL: SELECT DISTINCT CONTENTS FROM boxes WHERE value  >  (SELECT avg(value) FROM boxes)
Database: warehouse_1 (tables: boxes)
Question: List all different types of contents ordered by contents.
SQL: SELECT DISTINCT CONTENTS FROM boxes ORDER BY CONTENTS
Database: warehouse_1 (tables: boxes)
Question: What are the different contents of boxes, ordered alphabetically?
SQL: SELECT DISTINCT CONTENTS FROM boxes ORDER BY CONTENTS
Database: warehouse_1 (tables: boxes)
Question: Find the code of all boxes whose value is higher than the value of any boxes with Rocks as content.
SQL: SELECT code FROM boxes WHERE value  >  (SELECT min(value) FROM boxes WHERE CONTENTS  =  'Rocks')
Database: warehouse_1 (tables: boxes)
Question: What are the codes of boxes for which the value is greater than the value of any box that contains Rocks?
SQL: SELECT code FROM boxes WHERE value  >  (SELECT min(value) FROM boxes WHERE CONTENTS  =  'Rocks')
Database: warehouse_1 (tables: boxes)
Question: Find the code and content of all boxes whose value is higher than the value of all boxes with Scissors as content.
SQL: SELECT code ,  CONTENTS FROM boxes WHERE value  >  (SELECT max(value) FROM boxes WHERE CONTENTS  =  'Scissors')
Database: warehouse_1 (tables: boxes)
Question: What are the codes and corresponding contents of boxes for which their value is higher than the values of all boxes containing Scissors?
SQL: SELECT code ,  CONTENTS FROM boxes WHERE value  >  (SELECT max(value) FROM boxes WHERE CONTENTS  =  'Scissors')
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the total value of boxes stored in the warehouse with the largest capacity.
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code ORDER BY T2.capacity DESC LIMIT 1
Database: warehouse_1 (tables: boxes, warehouses)
Question: What is the total value of boxes kept in the warehouse with the greatest capacity?
SQL: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code ORDER BY T2.capacity DESC LIMIT 1
Database: warehouse_1 (tables: boxes)
Question: Select the warehouse code and the average value of the boxes only for those warehouses where the average value of the boxes is greater than 150.
SQL: SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse HAVING avg(value)  >  150
Database: warehouse_1 (tables: boxes)
Question: What are the average values of boxes for each warehouse than has an average value greater than 150?
SQL: SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse HAVING avg(value)  >  150
Database: warehouse_1 (tables: boxes)
Question: Find the total value and number of boxes for each content type.
SQL: SELECT sum(value) ,  count(*) ,  CONTENTS FROM boxes GROUP BY CONTENTS
Database: warehouse_1 (tables: boxes)
Question: For each content, what is the total value and number of boxes?
SQL: SELECT sum(value) ,  count(*) ,  CONTENTS FROM boxes GROUP BY CONTENTS
Database: warehouse_1 (tables: warehouses)
Question: Find the total, average, and maximum capacity for different locations.
SQL: SELECT sum(capacity) ,  avg(capacity) ,  max(capacity) ,  LOCATION FROM warehouses GROUP BY LOCATION
Database: warehouse_1 (tables: warehouses)
Question: For each location, what are the total, average, and maximum capacities of warehouses?
SQL: SELECT sum(capacity) ,  avg(capacity) ,  max(capacity) ,  LOCATION FROM warehouses GROUP BY LOCATION
Database: warehouse_1 (tables: warehouses)
Question: Find the total capacity of all warehouse locations.
SQL: SELECT sum(capacity) FROM warehouses
Database: warehouse_1 (tables: warehouses)
Question: What is the total capacity of all warehouses?
SQL: SELECT sum(capacity) FROM warehouses
Database: warehouse_1 (tables: boxes, warehouses)
Question: Find the value of the most expensive boxes saved in each warehouse location.
SQL: SELECT max(T1.value) ,  T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.location