db_id stringclasses 40
values | query stringlengths 22 608 | question stringlengths 22 185 |
|---|---|---|
car_racing | SELECT Manager , Sponsor FROM team ORDER BY Car_Owner | Find the manager and sponsor for each team and order them by the car owner. |
car_racing | SELECT make FROM team GROUP BY team HAVING count(*) > 1 | Find the make that has more than one team. |
car_racing | SELECT make FROM team GROUP BY team HAVING count(*) > 1 | Which make has more than one team? |
car_racing | SELECT Make FROM team WHERE Car_Owner = "Buddy Arrington" | What are the makes of the teams with car owner "Buddy Arrington"? |
car_racing | SELECT Make FROM team WHERE Car_Owner = "Buddy Arrington" | Find the make of the team whose car owner is "Buddy Arrington". |
car_racing | SELECT max(Points) , min(Points) FROM driver | What are the maximum and minimum points of drivers. |
car_racing | SELECT max(Points) , min(Points) FROM driver | Find the highest and lowest points of drivers. |
car_racing | SELECT count(*) FROM driver WHERE Points < 150 | How many drivers have points smaller than 150? |
car_racing | SELECT count(*) FROM driver WHERE Points < 150 | Count the number of drivers whose points are below 150. |
car_racing | SELECT Driver FROM driver ORDER BY Age ASC | List all the driver names in ascending order of age. |
car_racing | SELECT Driver FROM driver ORDER BY Age ASC | Sort the driver names by age in ascending order. |
car_racing | SELECT Driver FROM driver ORDER BY Points DESC | List all the driver names in descending order of points. |
car_racing | SELECT Driver FROM driver ORDER BY Points DESC | What is the list of drivers ordered by points in descending order? |
car_racing | SELECT T2.Driver , T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country | Please show the names of drivers, and countries they are from. |
car_racing | SELECT T2.Driver , T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country | For each driver, return his or her name and country. |
car_racing | SELECT max(T2.Points) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T1.Capital = "Dublin" | Show the maximum points of the drivers from countries with capital "Dublin" |
car_racing | SELECT max(T2.Points) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T1.Capital = "Dublin" | What is the maximum points of the drivers from a country whose capital is "Dublin"? |
car_racing | SELECT avg(T2.age) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T1.Official_native_language = "English" | What is the average age of drivers from countries with official native language "English" |
car_racing | SELECT avg(T2.age) FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T1.Official_native_language = "English" | Find the average age of the drivers from the countries that use "English" as official native language. |
car_racing | SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T2.Points > 150 | What are the countries that have drivers with points larger than 150? |
car_racing | SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country WHERE T2.Points > 150 | Find all the countries where some drivers have points above 150. |
car_racing | SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country ORDER BY T2.Points DESC LIMIT 1 | What is the capital of the country where the driver with the most points is from? |
car_racing | SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country ORDER BY T2.Points DESC LIMIT 1 | Which country is the driver with the highest points from? Give me the capital of the country. |
car_racing | SELECT Make , COUNT(*) FROM driver GROUP BY Make | List each make with the number of drivers with that make. |
car_racing | SELECT Make , COUNT(*) FROM driver GROUP BY Make | For each make, return the make and the count of drivers with that make. |
car_racing | SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1 | List the make that are associated with most drivers. |
car_racing | SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1 | Which make does the most drivers have? |
car_racing | SELECT Make FROM driver GROUP BY Make HAVING COUNT(*) >= 3 | List the driver makes that are associated with at least three drivers. |
car_racing | SELECT Make FROM driver GROUP BY Make HAVING COUNT(*) >= 3 | Which make is associated with 3 or more drivers? |
car_racing | SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver) | List the names of teams that do not have any drivers. |
car_racing | SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver) | Which team does not have drivers? |
car_racing | SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Chevrolet" | Which country has both drivers with make "Dodge" and drivers with make "Chevrolet"? |
car_racing | SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Chevrolet" | Find the countries in which there are both drivers with make "Dodge" and drivers with make "Chevrolet". |
car_racing | SELECT sum(Points) , avg(Points) FROM driver | Show total and average points of all drivers. |
car_racing | SELECT sum(Points) , avg(Points) FROM driver | What are the total and average points of drivers? |
car_racing | SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver) | Find the countries where no driver come from. |
car_racing | SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver) | Which countries do not have any drivers? |
car_racing | 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 | What are the manager and sponsor of the team that has the most drivers? |
car_racing | 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 | Find the manager and sponsor of the team that has the most drivers. |
car_racing | 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 | What are the manager and car owner of the team that has at least 2 drivers? |
car_racing | 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 | Find the team with two or more drivers and return the the manager and car owner of the team. |
institution_sports | SELECT count(*) FROM institution | How many institutions are there? |
institution_sports | SELECT count(*) FROM institution | Count the number of institutions. |
institution_sports | SELECT Name FROM institution ORDER BY Name ASC | List the names of institutions in ascending alphabetical order. |
institution_sports | SELECT Name FROM institution ORDER BY Name ASC | What are the names of institutions, ordered alphabetically? |
institution_sports | SELECT Name FROM institution ORDER BY Founded ASC | List the names of institutions in ascending order of founded year. |
institution_sports | SELECT Name FROM institution ORDER BY Founded ASC | What are the names of institutions, ordered by the years in which they were founded? |
institution_sports | SELECT City , Province FROM institution | What are the cities and provinces of institutions? |
institution_sports | SELECT City , Province FROM institution | Return the cities and provinces of institutions. |
institution_sports | SELECT max(Enrollment) , min(Enrollment) FROM institution | What are the maximum and minimum enrollment of all institutions? |
institution_sports | SELECT max(Enrollment) , min(Enrollment) FROM institution | Return the maximum and minimum enrollment across all institutions. |
institution_sports | SELECT Affiliation FROM institution WHERE City != "Vancouver" | What are the affiliations of institutions that are not in city "Vancouver"? |
institution_sports | SELECT Affiliation FROM institution WHERE City != "Vancouver" | Return the affiliations of instituions that are not in the city of Vancouver. |
institution_sports | SELECT Stadium FROM institution ORDER BY Capacity DESC | What are the stadiums of institutions in descending order of the capacity. |
institution_sports | SELECT Stadium FROM institution ORDER BY Capacity DESC | Return the stadiums of institutions, ordered by capacity descending. |
institution_sports | SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1 | What is the stadium of the institution with the largest enrollment? |
institution_sports | SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1 | Give the stadium of the institution which is the greatest enrollment. |
institution_sports | SELECT T2.Name , T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID | What are the names and nicknames of institutions? |
institution_sports | SELECT T2.Name , T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID | Return the names of institutions, as well as their nicknames. |
institution_sports | 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 | What is the nickname of the institution with the smallest enrollment? |
institution_sports | 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 | Return the nickname of the institution with the lowest enrollment. |
institution_sports | 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 | List the names of institutions in descending order of the number of championships. |
institution_sports | 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 | What are the names of institutions, ordered descending by their number of championships? |
institution_sports | SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID WHERE T1.Number_of_Championships >= 1 | List the names of institutions with at least one championship. |
institution_sports | SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID WHERE T1.Number_of_Championships >= 1 | What are the names of institutions that have 1 or more championships? |
institution_sports | 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" | What is the total number of championship of institution with public affiliation? |
institution_sports | 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" | Return the total number of championships of institutions that have a Public affiliation. |
institution_sports | SELECT Affiliation , COUNT(*) FROM institution GROUP BY Affiliation | What are different types of affiliations of institutions and the corresponding number of institutions? |
institution_sports | SELECT Affiliation , COUNT(*) FROM institution GROUP BY Affiliation | How many institutions are there for each type of affiliation? |
institution_sports | SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common type of affiliation for institutions? |
institution_sports | SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1 | Return the most common type of affiliation across all institutions. |
institution_sports | SELECT Founded , COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*) > 1 | In which years were more than one institution founded? |
institution_sports | SELECT Founded , COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*) > 1 | Return the years in which more than 1 institution was founded, as well as the number of institutions founded in each of those. |
institution_sports | SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID ORDER BY T2.Capacity DESC | List the nicknames of institutions in descending order of capacity. |
institution_sports | SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID ORDER BY T2.Capacity DESC | What are the nicknames of institutions, ordered descending by their capacities? |
institution_sports | select sum(enrollment) from institution where city = "vancouver" or city = "calgary" | What are the total enrollment of institutions in city `` Vancouver '' or `` Calgary '' ? |
institution_sports | select sum(enrollment) from institution where city = "vancouver" or city = "calgary" | Return all the enrollments of institutions in either the city of Vancouver or the city of Calgary . |
institution_sports | SELECT Province FROM institution WHERE Founded < 1920 INTERSECT SELECT Province FROM institution WHERE Founded > 1950 | Show the provinces that have both institutions founded before 1920 and institutions founded after 1950. |
institution_sports | SELECT Province FROM institution WHERE Founded < 1920 INTERSECT SELECT Province FROM institution WHERE Founded > 1950 | What are the provinces that have not only institutions founded before 1920, but also institutions founded after 1950? |
institution_sports | SELECT count(DISTINCT Province) FROM institution | How many distinct provinces are the institutions in? |
institution_sports | SELECT count(DISTINCT Province) FROM institution | Count the number of different provinces that have institutions. |
warehouse_1 | SELECT * FROM warehouses | Select all details of all warehouses. |
warehouse_1 | SELECT * FROM warehouses | What is all the information about the warehouses? |
warehouse_1 | SELECT DISTINCT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE LOCATION = 'New York' | Find all different contents stored in New York. |
warehouse_1 | SELECT DISTINCT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE LOCATION = 'New York' | What are all the different contents stored in boxes in New York? |
warehouse_1 | SELECT CONTENTS FROM boxes WHERE Value > 150 | Select contents of all boxes with a value larger than $150. |
warehouse_1 | SELECT CONTENTS FROM boxes WHERE Value > 150 | What are the contents of boxes with value greater than 150? |
warehouse_1 | SELECT warehouse , avg(value) FROM boxes GROUP BY warehouse | Select the warehouse code and the average value of the boxes in each warehouse. |
warehouse_1 | SELECT warehouse , avg(value) FROM boxes GROUP BY warehouse | What is the average value of boxes for each warehouse? |
warehouse_1 | SELECT avg(value) , sum(value) FROM boxes | Find the average and total values of all boxes. |
warehouse_1 | SELECT avg(value) , sum(value) FROM boxes | What are the average and total values across all boxes? |
warehouse_1 | SELECT avg(capacity) , sum(capacity) FROM warehouses | Find the average and total capacity of all warehouses. |
warehouse_1 | SELECT avg(capacity) , sum(capacity) FROM warehouses | What are the average and total capacities across all warehouses? |
warehouse_1 | SELECT avg(value) , max(value) , CONTENTS FROM boxes GROUP BY CONTENTS | Find the average and maximum value for each different content. |
warehouse_1 | SELECT avg(value) , max(value) , CONTENTS FROM boxes GROUP BY CONTENTS | What are the average and maximum values for each type of content in boxes? |
warehouse_1 | SELECT CONTENTS FROM boxes ORDER BY value DESC LIMIT 1 | Find the content that has the highest total values in all boxes. |
warehouse_1 | SELECT CONTENTS FROM boxes ORDER BY value DESC LIMIT 1 | What is the content with the greatest value across all boxes? |
warehouse_1 | SELECT avg(value) FROM boxes | Select the average value of all the boxes. |
warehouse_1 | SELECT avg(value) FROM boxes | What is the average value of boxes? |
warehouse_1 | SELECT DISTINCT CONTENTS FROM boxes | Select all distinct contents in all the boxes. |
Subsets and Splits
World Countries Non-English Languages
The query filters specific database entries based on a particular query pattern, providing limited insight as it simply retrieves rows that match a specific condition.