output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MAX("profits_billion") FROM "2004_list" WHERE "headquarters"='usa' AND "market_value_billion"=194.87 AND "sales_billion"<76.66; |
## Task
Generate a SQL query to answer the following question:
`What is the highest profits in billions of the company headquartered in the USA with a market value of 194.87 billions and less than 76.66 billions in sales?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2004_list" (
"rank" real,
"company" text,
"headquarters" text,
"industry" text,
"sales_billion" real,
"profits_billion" real,
"assets_billion" real,
"market_value_billion" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest profits in billions of the company headquartered in the USA with a market value of 194.87 billions and less than 76.66 billions in sales?`:
```sql
|
SELECT MIN("total") FROM "medal_table" WHERE "nation"='japan' AND "silver">2; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Nation of japan, and a Silver larger than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Nation of japan, and a Silver larger than 2?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "gold">0 AND "total">4 AND "rank"='6'; |
## Task
Generate a SQL query to answer the following question:
`Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?`:
```sql
|
SELECT SUM("silver") FROM "medal_table" WHERE "rank"='1' AND "total"<11; |
## Task
Generate a SQL query to answer the following question:
`Which Silver has a Rank of 1, and a Total smaller than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Silver has a Rank of 1, and a Total smaller than 11?`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "nation"='united states' AND "bronze">3; |
## Task
Generate a SQL query to answer the following question:
`Which Total has a Nation of united states, and a Bronze larger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Total has a Nation of united states, and a Bronze larger than 3?`:
```sql
|
SELECT "venue" FROM "list_a_partnership_records" WHERE "opponent"='queensland' AND "batsmen"='jamie cox & daniel marsh'; |
## Task
Generate a SQL query to answer the following question:
`Where did jamie cox & daniel marsh play against queensland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_a_partnership_records" (
"wicket" text,
"runs" text,
"batsmen" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did jamie cox & daniel marsh play against queensland?`:
```sql
|
SELECT "venue" FROM "list_a_partnership_records" WHERE "batsmen"='jamie cox & scott kremerskothen'; |
## Task
Generate a SQL query to answer the following question:
`Where were jamie cox & scott kremerskothen paired?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_a_partnership_records" (
"wicket" text,
"runs" text,
"batsmen" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where were jamie cox & scott kremerskothen paired?`:
```sql
|
SELECT "batsmen" FROM "list_a_partnership_records" WHERE "wicket"='7'; |
## Task
Generate a SQL query to answer the following question:
`Who were the batsmen paired for wicket 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_a_partnership_records" (
"wicket" text,
"runs" text,
"batsmen" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the batsmen paired for wicket 7?`:
```sql
|
SELECT "runs" FROM "list_a_partnership_records" WHERE "opponent"='new south wales' AND "season"='2002/03'; |
## Task
Generate a SQL query to answer the following question:
`How many runs did they get against new south wales in 2002/03?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_a_partnership_records" (
"wicket" text,
"runs" text,
"batsmen" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many runs did they get against new south wales in 2002/03?`:
```sql
|
SELECT "season" FROM "list_a_partnership_records" WHERE "opponent"='queensland' AND "wicket"='4'; |
## Task
Generate a SQL query to answer the following question:
`What season did they play queensland at wicket 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_a_partnership_records" (
"wicket" text,
"runs" text,
"batsmen" text,
"opponent" text,
"venue" text,
"season" text
);
### SQL
Given the database schema, here is the SQL query that answers `What season did they play queensland at wicket 4?`:
```sql
|
SELECT "peak_position" FROM "singles" WHERE "date"='july 11, 2001'; |
## Task
Generate a SQL query to answer the following question:
`What was the Peak Position on July 11, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"date" text,
"title" text,
"peak_position" real,
"weeks" text,
"sales" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Peak Position on July 11, 2001?`:
```sql
|
SELECT "weeks" FROM "singles" WHERE "date"='december 12, 2001'; |
## Task
Generate a SQL query to answer the following question:
`On December 12, 2001, how many weeks had the single been in its position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles" (
"date" text,
"title" text,
"peak_position" real,
"weeks" text,
"sales" real
);
### SQL
Given the database schema, here is the SQL query that answers `On December 12, 2001, how many weeks had the single been in its position?`:
```sql
|
SELECT "nationality" FROM "c" WHERE "school_club_team"='purdue'; |
## Task
Generate a SQL query to answer the following question:
`What is the nationality of the Team Purdue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality of the Team Purdue?`:
```sql
|
SELECT "nationality" FROM "c" WHERE "school_club_team"='georgia tech'; |
## Task
Generate a SQL query to answer the following question:
`What is the nationality of the Team Georgia Tech?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality of the Team Georgia Tech?`:
```sql
|
SELECT "nationality" FROM "c" WHERE "position"='forward' AND "years_for_grizzlies"='2011'; |
## Task
Generate a SQL query to answer the following question:
`What is the nationality of the forward position on the Grizzlies in 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality of the forward position on the Grizzlies in 2011?`:
```sql
|
SELECT "runner_up" FROM "individual_champions" WHERE "venue"='tartu, estonia'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner-up at the event held in Tartu, Estonia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_champions" (
"year" real,
"venue" text,
"winner" text,
"runner_up" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner-up at the event held in Tartu, Estonia?`:
```sql
|
SELECT "runner_up" FROM "individual_champions" WHERE "venue"='tartu, estonia'; |
## Task
Generate a SQL query to answer the following question:
`For the event held in Tartu, Estonia, what is the name of the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_champions" (
"year" real,
"venue" text,
"winner" text,
"runner_up" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the event held in Tartu, Estonia, what is the name of the runner-up?`:
```sql
|
SELECT "third_place" FROM "individual_champions" WHERE "year"=2012; |
## Task
Generate a SQL query to answer the following question:
`Who took third place in 2012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_champions" (
"year" real,
"venue" text,
"winner" text,
"runner_up" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who took third place in 2012?`:
```sql
|
SELECT "year" FROM "individual_champions" WHERE "venue"='oslo, norway'; |
## Task
Generate a SQL query to answer the following question:
`In what year was this event held in Oslo, Norway?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_champions" (
"year" real,
"venue" text,
"winner" text,
"runner_up" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was this event held in Oslo, Norway?`:
```sql
|
SELECT "head_s_of_government" FROM "list_of_foreign_ministers" WHERE "name"='don stephen senanayake'; |
## Task
Generate a SQL query to answer the following question:
`What is the head of government for Don Stephen Senanayake?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_foreign_ministers" (
"name" text,
"party" text,
"tenure" text,
"head_s_of_government" text,
"ministerial_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the head of government for Don Stephen Senanayake?`:
```sql
|
SELECT "team" FROM "24_hours_of_le_mans_results" WHERE "pos"='14th'; |
## Task
Generate a SQL query to answer the following question:
`Which team is in 14th position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team is in 14th position?`:
```sql
|
SELECT "pos" FROM "24_hours_of_le_mans_results" WHERE "year">1997 AND "class_pos"='3rd'; |
## Task
Generate a SQL query to answer the following question:
`Which position has a Year larger than 1997, and a Class Position of 3rd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which position has a Year larger than 1997, and a Class Position of 3rd?`:
```sql
|
SELECT "2nd_leg" FROM "round_of_16" WHERE "team_num2"='san lorenzo'; |
## Task
Generate a SQL query to answer the following question:
`What is 2nd Leg, when Team #2 is "San Lorenzo"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_of_16" (
"team_num1" text,
"points" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is 2nd Leg, when Team #2 is "San Lorenzo"?`:
```sql
|
SELECT "clock_speed" FROM "standard_voltage_90_nm" WHERE "fsb_speed"='400 mhz' AND "model_number"='c7-m 794'; |
## Task
Generate a SQL query to answer the following question:
`Which Clock Speed has a FSB Speed of 400 mhz, and a Model Number of c7-m 794?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Clock Speed has a FSB Speed of 400 mhz, and a Model Number of c7-m 794?`:
```sql
|
SELECT "socket" FROM "standard_voltage_90_nm" WHERE "fsb_speed"='400 mhz' AND "voltage_range"='1.004 v'; |
## Task
Generate a SQL query to answer the following question:
`Which Socket has a FSB Speed of 400 mhz, and a Voltage Range of 1.004 v?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Socket has a FSB Speed of 400 mhz, and a Voltage Range of 1.004 v?`:
```sql
|
SELECT "clock_multiplier" FROM "standard_voltage_90_nm" WHERE "clock_speed"='1.6 ghz' AND "model_number"='c7-m 764'; |
## Task
Generate a SQL query to answer the following question:
`Which Clock Multiplier has a Clock Speed of 1.6 ghz, and a Model Number of c7-m 764?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Clock Multiplier has a Clock Speed of 1.6 ghz, and a Model Number of c7-m 764?`:
```sql
|
SELECT "fsb_speed" FROM "standard_voltage_90_nm" WHERE "model_number"='c7-m 765'; |
## Task
Generate a SQL query to answer the following question:
`Which FSB Speed has a Model Number of c7-m 765?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which FSB Speed has a Model Number of c7-m 765?`:
```sql
|
SELECT "clock_multiplier" FROM "standard_voltage_90_nm" WHERE "model_number"='c7-m 764'; |
## Task
Generate a SQL query to answer the following question:
`Which Clock Multiplier has a Model Number of c7-m 764?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Clock Multiplier has a Model Number of c7-m 764?`:
```sql
|
SELECT "release_date" FROM "standard_voltage_90_nm" WHERE "voltage_range"='1.148 v - 1.196 v'; |
## Task
Generate a SQL query to answer the following question:
`Which Release Date has a Voltage Range of 1.148 v - 1.196 v?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "standard_voltage_90_nm" (
"model_number" text,
"clock_speed" text,
"l2_cache" text,
"fsb_speed" text,
"clock_multiplier" text,
"voltage_range" text,
"socket" text,
"release_date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Release Date has a Voltage Range of 1.148 v - 1.196 v?`:
```sql
|
SELECT "player" FROM "first_round" WHERE "place"='t2'; |
## Task
Generate a SQL query to answer the following question:
`Who are the players that placed t2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the players that placed t2?`:
```sql
|
SELECT "country" FROM "first_round" WHERE "player"='lee trevino'; |
## Task
Generate a SQL query to answer the following question:
`Which country is Lee Trevino from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which country is Lee Trevino from?`:
```sql
|
SELECT "player" FROM "first_round" WHERE "country"='south africa'; |
## Task
Generate a SQL query to answer the following question:
`Which player(s) is from South Africa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player(s) is from South Africa?`:
```sql
|
SELECT "record" FROM "year_by_year_record" WHERE "year">1992 AND "manager"='tom kotchman' AND "finish"='2nd'; |
## Task
Generate a SQL query to answer the following question:
`what is the record when the year is after 1992, manager is tom kotchman and finish is 2nd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"mlb_club" text,
"record" text,
"finish" text,
"manager" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the record when the year is after 1992, manager is tom kotchman and finish is 2nd?`:
```sql
|
SELECT "finish" FROM "year_by_year_record" WHERE "manager"='tom kotchman' AND "record"='43-33'; |
## Task
Generate a SQL query to answer the following question:
`what is the finish when the manager is tom kotchman and record is 43-33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"mlb_club" text,
"record" text,
"finish" text,
"manager" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the finish when the manager is tom kotchman and record is 43-33?`:
```sql
|
SELECT "finish" FROM "year_by_year_record" WHERE "manager"='tom kotchman' AND "record"='40-36'; |
## Task
Generate a SQL query to answer the following question:
`what is the finish when the manager is tom kotchman and the record is 40-36?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"mlb_club" text,
"record" text,
"finish" text,
"manager" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the finish when the manager is tom kotchman and the record is 40-36?`:
```sql
|
SELECT "manager" FROM "year_by_year_record" WHERE "year"<1994 AND "finish"='5th'; |
## Task
Generate a SQL query to answer the following question:
`who is the manager when the year is before 1994 and finish is 5th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"mlb_club" text,
"record" text,
"finish" text,
"manager" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the manager when the year is before 1994 and finish is 5th?`:
```sql
|
SELECT "record" FROM "year_by_year_record" WHERE "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`what is the record when the year is 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "year_by_year_record" (
"year" real,
"mlb_club" text,
"record" text,
"finish" text,
"manager" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the record when the year is 2011?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "total"=294 AND "year_s_won"='1955'; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when Total is "294", and when Year(s) Won is "1955"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Player, when Total is "294", and when Year(s) Won is "1955"?`:
```sql
|
SELECT "player" FROM "made_the_cut" WHERE "to_par"<14; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when To Par is less than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Player, when To Par is less than 14?`:
```sql
|
SELECT "to_par" FROM "made_the_cut" WHERE "player"='tommy bolt'; |
## Task
Generate a SQL query to answer the following question:
`What is To Par, when Player is "Tommy Bolt"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is To Par, when Player is "Tommy Bolt"?`:
```sql
|
SELECT SUM("total") FROM "made_the_cut" WHERE "player"='tommy bolt'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Total, when Player is "Tommy Bolt"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Total, when Player is "Tommy Bolt"?`:
```sql
|
SELECT COUNT("total") FROM "made_the_cut" WHERE "to_par"=7; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Total, when To Par is "7"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real,
"finish" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Total, when To Par is "7"?`:
```sql
|
SELECT "award" FROM "award_and_nominations" WHERE "result"='won' AND "nomination"='senses around'; |
## Task
Generate a SQL query to answer the following question:
`Which award was won when the nomination was Senses Around?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "award_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which award was won when the nomination was Senses Around?`:
```sql
|
SELECT "nomination" FROM "award_and_nominations" WHERE "year"<2009; |
## Task
Generate a SQL query to answer the following question:
`What was the nomination in a year earlier than 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "award_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the nomination in a year earlier than 2009?`:
```sql
|
SELECT "award" FROM "award_and_nominations" WHERE "category"='best new artist'; |
## Task
Generate a SQL query to answer the following question:
`Which award is for the category Best New Artist?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "award_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which award is for the category Best New Artist?`:
```sql
|
SELECT MIN("year") FROM "award_and_nominations" WHERE "category"='top 10 selling mandarin albums of the year'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year with a category of Top 10 Selling Mandarin Albums of the Year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "award_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year with a category of Top 10 Selling Mandarin Albums of the Year?`:
```sql
|
SELECT "discipline" FROM "j" WHERE "championship"='usac national championship'; |
## Task
Generate a SQL query to answer the following question:
`For the USAC National Championship, what is the Discipline?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "j" (
"discipline" text,
"championship" text,
"circuit" text,
"event" text,
"session" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the USAC National Championship, what is the Discipline?`:
```sql
|
SELECT "championship" FROM "j" WHERE "session"='race' AND "event"='indianapolis sweepstakes'; |
## Task
Generate a SQL query to answer the following question:
`In the Indianapolis Sweepstakes race session, what is the championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "j" (
"discipline" text,
"championship" text,
"circuit" text,
"event" text,
"session" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the Indianapolis Sweepstakes race session, what is the championship?`:
```sql
|
SELECT "circuit" FROM "j" WHERE "championship"='sprint cup series'; |
## Task
Generate a SQL query to answer the following question:
`What circuit is the Sprint Cup series championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "j" (
"discipline" text,
"championship" text,
"circuit" text,
"event" text,
"session" text
);
### SQL
Given the database schema, here is the SQL query that answers `What circuit is the Sprint Cup series championship?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "attendance"='25,000'; |
## Task
Generate a SQL query to answer the following question:
`What were the Results for 25,000 Attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the Results for 25,000 Attendance?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='10/06/1934'; |
## Task
Generate a SQL query to answer the following question:
`What was the result on 10/06/1934?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"site" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result on 10/06/1934?`:
```sql
|
SELECT SUM("founded") FROM "former_teams" WHERE "stadium"='hiram bithorn stadium' AND "club"='atlético de san juan fc'; |
## Task
Generate a SQL query to answer the following question:
`What year was the team Club of atlético de san juan fc who plays at hiram bithorn stadium founded.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_teams" (
"club" text,
"home_city" text,
"stadium" text,
"founded" real,
"seasons_in_prsl" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the team Club of atlético de san juan fc who plays at hiram bithorn stadium founded.`:
```sql
|
SELECT "branding" FROM "fbs_radio_stations" WHERE "power"='10 kw' AND "location"='iloilo city'; |
## Task
Generate a SQL query to answer the following question:
`What is the Branding of the Iloilo City Frequency with a Power of 10 Kw?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Branding of the Iloilo City Frequency with a Power of 10 Kw?`:
```sql
|
SELECT "power" FROM "fbs_radio_stations" WHERE "callsign"='dxll'; |
## Task
Generate a SQL query to answer the following question:
`What is the Power of the Frequency with a Callsign of DXLL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Power of the Frequency with a Callsign of DXLL?`:
```sql
|
SELECT "frequency" FROM "fbs_radio_stations" WHERE "location"='davao city'; |
## Task
Generate a SQL query to answer the following question:
`What is the Frequency in Davao City?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Frequency in Davao City?`:
```sql
|
SELECT "branding" FROM "fbs_radio_stations" WHERE "callsign"='dwll'; |
## Task
Generate a SQL query to answer the following question:
`What is the Branding with a Callsign DWLL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Branding with a Callsign DWLL?`:
```sql
|
SELECT "branding" FROM "fbs_radio_stations" WHERE "location"='metro manila' AND "callsign"='dwbl'; |
## Task
Generate a SQL query to answer the following question:
`What is the Branding of the Metro Manila Frequency with a Callsign of DWBL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Branding of the Metro Manila Frequency with a Callsign of DWBL?`:
```sql
|
SELECT "location" FROM "fbs_radio_stations" WHERE "callsign"='dxbl'; |
## Task
Generate a SQL query to answer the following question:
`What is the Location of the Frequency with a Callsign of DXBL?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fbs_radio_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Location of the Frequency with a Callsign of DXBL?`:
```sql
|
SELECT "name" FROM "chasma" WHERE "year_named">1997 AND "longitude"='213.0e'; |
## Task
Generate a SQL query to answer the following question:
`What name in a year after 1997 has a longitude of 213.0e?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chasma" (
"name" text,
"latitude" text,
"longitude" text,
"diameter_km" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `What name in a year after 1997 has a longitude of 213.0e?`:
```sql
|
SELECT COUNT("year_named") FROM "chasma" WHERE "longitude"='36.8e' AND "diameter_km">697; |
## Task
Generate a SQL query to answer the following question:
`How many years correspond to longitude of 36.8e and diameter greater than 697?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chasma" (
"name" text,
"latitude" text,
"longitude" text,
"diameter_km" real,
"year_named" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many years correspond to longitude of 36.8e and diameter greater than 697?`:
```sql
|
SELECT COUNT("pick_num") FROM "nfl_draft" WHERE "position"='center' AND "round"<6; |
## Task
Generate a SQL query to answer the following question:
`What was the pick # for a center picked before round 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the pick # for a center picked before round 6?`:
```sql
|
SELECT "team" FROM "participating_teams" WHERE "seed">7 AND "notes"='ncraa champion'; |
## Task
Generate a SQL query to answer the following question:
`What team with a seed value greater than 7 has a note that they were an NCRAA champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "participating_teams" (
"seed" real,
"team" text,
"league" text,
"notes" text,
"eliminated_at" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team with a seed value greater than 7 has a note that they were an NCRAA champion?`:
```sql
|
SELECT COUNT("oricon_peak") FROM "studio_albums" WHERE "label"='atlantic' AND "title"='subhuman race' AND "date_of_release">1995; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE ORICON PEAK NUMBER WITH AN ATLANTIC LABEL, SUBHUMAN RACE, LATER THAN 1995?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "studio_albums" (
"date_of_release" real,
"title" text,
"label" text,
"oricon_peak" real,
"riaa_cert" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE ORICON PEAK NUMBER WITH AN ATLANTIC LABEL, SUBHUMAN RACE, LATER THAN 1995?`:
```sql
|
SELECT "label" FROM "studio_albums" WHERE "date_of_release"=1991; |
## Task
Generate a SQL query to answer the following question:
`WHAT LABEL HAD A RELEASE DATE OF 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "studio_albums" (
"date_of_release" real,
"title" text,
"label" text,
"oricon_peak" real,
"riaa_cert" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT LABEL HAD A RELEASE DATE OF 1991?`:
```sql
|
SELECT AVG("date_of_release") FROM "studio_albums" WHERE "title"='thickskin'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE AVERAGE DATE OF RELEASE FOR THICKSKIN?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "studio_albums" (
"date_of_release" real,
"title" text,
"label" text,
"oricon_peak" real,
"riaa_cert" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE AVERAGE DATE OF RELEASE FOR THICKSKIN?`:
```sql
|
SELECT MIN("enrollment") FROM "former_members" WHERE "left"=2012 AND "current_conference"='mid-south'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest enrollment amount for a year left of 2012 and a current conference of Mid-South?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_members" (
"location" text,
"founded" real,
"type" text,
"enrollment" real,
"nickname" text,
"joined" real,
"left" real,
"current_conference" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest enrollment amount for a year left of 2012 and a current conference of Mid-South?`:
```sql
|
SELECT SUM("season") FROM "results" WHERE "score"='1:3' AND "venue"='national stadium, maldives'; |
## Task
Generate a SQL query to answer the following question:
`Which season was there a game with the score of 1:3 played at the venue of national stadium, maldives?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"team_1" text,
"score" text,
"team_2" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which season was there a game with the score of 1:3 played at the venue of national stadium, maldives?`:
```sql
|
SELECT "venue" FROM "results" WHERE "score"='1:3' AND "team_2"='binh duong'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue of the match where the score was 1:3 and team 2 was binh duong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"team_1" text,
"score" text,
"team_2" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue of the match where the score was 1:3 and team 2 was binh duong?`:
```sql
|
SELECT "score" FROM "results" WHERE "team_2"='club valencia'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game when team 2 was club valencia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"team_1" text,
"score" text,
"team_2" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game when team 2 was club valencia?`:
```sql
|
SELECT "venue" FROM "results" WHERE "team_2"='pea' AND "score"='1:3'; |
## Task
Generate a SQL query to answer the following question:
`What was the venue of the match where team 2 was pea and the score was 1:3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" real,
"team_1" text,
"score" text,
"team_2" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the venue of the match where team 2 was pea and the score was 1:3?`:
```sql
|
SELECT "solar" FROM "world_top_10_renewable_electricity_produ" WHERE "year"=2011 AND "hydroelectricity"<119.6; |
## Task
Generate a SQL query to answer the following question:
`In 2011 with a hydroelectricity less than 119.6, what was the solar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_top_10_renewable_electricity_produ" (
"country" text,
"year" real,
"total" real,
"hydroelectricity" real,
"wind_power" real,
"biomass_and_waste" text,
"solar" real
);
### SQL
Given the database schema, here is the SQL query that answers `In 2011 with a hydroelectricity less than 119.6, what was the solar?`:
```sql
|
SELECT MIN("hydroelectricity") FROM "world_top_10_renewable_electricity_produ" WHERE "total"<116.4 AND "solar">18.637; |
## Task
Generate a SQL query to answer the following question:
`What is the minimum hydroelectricity with a less than 116.4 total, and a greater than 18.637 solar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_top_10_renewable_electricity_produ" (
"country" text,
"year" real,
"total" real,
"hydroelectricity" real,
"wind_power" real,
"biomass_and_waste" text,
"solar" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the minimum hydroelectricity with a less than 116.4 total, and a greater than 18.637 solar?`:
```sql
|
SELECT AVG("hydroelectricity") FROM "world_top_10_renewable_electricity_produ" WHERE "year">2011 AND "wind_power"<13.333; |
## Task
Generate a SQL query to answer the following question:
`In 2011 with a less than 13.333 wind power what is the mean hydroelectricity?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_top_10_renewable_electricity_produ" (
"country" text,
"year" real,
"total" real,
"hydroelectricity" real,
"wind_power" real,
"biomass_and_waste" text,
"solar" real
);
### SQL
Given the database schema, here is the SQL query that answers `In 2011 with a less than 13.333 wind power what is the mean hydroelectricity?`:
```sql
|
SELECT "country" FROM "world_top_10_renewable_electricity_produ" WHERE "total"<136.1 AND "solar"=0.02; |
## Task
Generate a SQL query to answer the following question:
`What country has a less than 136.1 total and a 0.02 solar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_top_10_renewable_electricity_produ" (
"country" text,
"year" real,
"total" real,
"hydroelectricity" real,
"wind_power" real,
"biomass_and_waste" text,
"solar" real
);
### SQL
Given the database schema, here is the SQL query that answers `What country has a less than 136.1 total and a 0.02 solar?`:
```sql
|
SELECT "home" FROM "round_13" WHERE "away"='hispano'; |
## Task
Generate a SQL query to answer the following question:
`Home for away of hispano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"date" text,
"home" text,
"score" text,
"away" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `Home for away of hispano?`:
```sql
|
SELECT "position" FROM "round_four" WHERE "pick_num"<23 AND "player"='garrett sutherland'; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Pick # smaller than 23, and a Player of garrett sutherland?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Pick # smaller than 23, and a Player of garrett sutherland?`:
```sql
|
SELECT "cfl_team" FROM "round_four" WHERE "player"='chris evraire'; |
## Task
Generate a SQL query to answer the following question:
`Name the CFL Team which has a Player of chris evraire?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the CFL Team which has a Player of chris evraire?`:
```sql
|
SELECT "player" FROM "round_four" WHERE "pick_num"=27; |
## Task
Generate a SQL query to answer the following question:
`Name The Player who has a Pick # of 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name The Player who has a Pick # of 27?`:
```sql
|
SELECT "player" FROM "round_four" WHERE "cfl_team"='toronto'; |
## Task
Generate a SQL query to answer the following question:
`Name the Player who has a CFL Team of toronto?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Player who has a CFL Team of toronto?`:
```sql
|
SELECT SUM("pick_num") FROM "round_four" WHERE "position"='lb' AND "cfl_team"='winnipeg'; |
## Task
Generate a SQL query to answer the following question:
`Name the Pick # which has a Position of lb, and a CFL Team of winnipeg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the Pick # which has a Position of lb, and a CFL Team of winnipeg?`:
```sql
|
SELECT SUM("attendance") FROM "game_log" WHERE "home"='detroit' AND "points">33; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE SUM OF ATTENDANCE FOR DETROIT, WHEN POINTS ARE LARGER THAN 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" real,
"record" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE SUM OF ATTENDANCE FOR DETROIT, WHEN POINTS ARE LARGER THAN 33?`:
```sql
|
SELECT "location_attendance" FROM "game_log" WHERE "date"='december 12'; |
## Task
Generate a SQL query to answer the following question:
`What was the location and attendance for the game on December 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the location and attendance for the game on December 12?`:
```sql
|
SELECT MIN("touchdowns") FROM "receiving" WHERE "player"='andrew glover' AND "yards">281; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Touchdowns, when Player is Andrew Glover, and when Yards is greater than 281?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"attempts" real,
"yards" real,
"avg_yards" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Touchdowns, when Player is Andrew Glover, and when Yards is greater than 281?`:
```sql
|
SELECT AVG("touchdowns") FROM "receiving" WHERE "yards"<293 AND "long">39; |
## Task
Generate a SQL query to answer the following question:
`What is the average Touchdowns, when Yards is less than 293, and when Long is greater than 39?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"attempts" real,
"yards" real,
"avg_yards" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Touchdowns, when Yards is less than 293, and when Long is greater than 39?`:
```sql
|
SELECT COUNT("attempts") FROM "receiving" WHERE "touchdowns"=6; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Attempts, when Touchdowns is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "receiving" (
"player" text,
"attempts" real,
"yards" real,
"avg_yards" real,
"long" real,
"touchdowns" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Attempts, when Touchdowns is 6?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "extra"='pentathlon'; |
## Task
Generate a SQL query to answer the following question:
`What is Venue, when Extra is Pentathlon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Venue, when Extra is Pentathlon?`:
```sql
|
SELECT MAX("year") FROM "achievements" WHERE "extra"='pentathlon'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Year, when Extra is Pentathlon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Year, when Extra is Pentathlon?`:
```sql
|
SELECT SUM("year") FROM "achievements" WHERE "result"='9th'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Year, when Result is 9th?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Year, when Result is 9th?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "result"='2nd' AND "year"=2009; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Result is 2nd, and when Year is 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Result is 2nd, and when Year is 2009?`:
```sql
|
SELECT "result" FROM "achievements" WHERE "venue"='götzis , austria'; |
## Task
Generate a SQL query to answer the following question:
`What is Result, when Venue is Götzis , Austria?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Result, when Venue is Götzis , Austria?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "region"='germany'; |
## Task
Generate a SQL query to answer the following question:
`What label does Germany have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What label does Germany have?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "label"='chrysalis' AND "catalog"='chr 1047'; |
## Task
Generate a SQL query to answer the following question:
`What region has the Chrysalis label, and a Catalog of chr 1047?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region has the Chrysalis label, and a Catalog of chr 1047?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "region"='united kingdom' AND "format"='stereo lp'; |
## Task
Generate a SQL query to answer the following question:
`When did the United Kingdom format a stereo LP?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the United Kingdom format a stereo LP?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "date"='january 1974'; |
## Task
Generate a SQL query to answer the following question:
`What region goes along with January 1974?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What region goes along with January 1974?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "date"='1973' AND "catalog"='l 35023'; |
## Task
Generate a SQL query to answer the following question:
`What is the label from 1973 that has a catalog number of l 35023?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the label from 1973 that has a catalog number of l 35023?`:
```sql
|
SELECT "wins" FROM "season_by_season" WHERE "second"='1' AND "races">12; |
## Task
Generate a SQL query to answer the following question:
`How many wins did the driver with 1 second and more than 12 races have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_by_season" (
"driver" text,
"points" real,
"races" real,
"wins" text,
"second" text,
"third" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins did the driver with 1 second and more than 12 races have?`:
```sql
|
SELECT MIN("loss") FROM "rushing" WHERE "gain"<61 AND "avg_g"=6; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Loss number when the Gain is less than 61 and the Avg/G is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"name" text,
"gp_gs" real,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Loss number when the Gain is less than 61 and the Avg/G is 6?`:
```sql
|
SELECT SUM("avg_g") FROM "rushing" WHERE "loss"=0 AND "name"='dan dierking' AND "gain">34; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Avg/G for Dan Dierking when the Loss is 0 and the Gain is more than 34?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rushing" (
"name" text,
"gp_gs" real,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Avg/G for Dan Dierking when the Loss is 0 and the Gain is more than 34?`:
```sql
|
SELECT "visitor" FROM "chicago_black_hawks_4_detroit_red_wings_" WHERE "date"='april 6'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team on April 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chicago_black_hawks_4_detroit_red_wings_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team on April 6?`:
```sql
|
SELECT "date" FROM "chicago_black_hawks_4_detroit_red_wings_" WHERE "record"='4-3'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game that led to a 4-3 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "chicago_black_hawks_4_detroit_red_wings_" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game that led to a 4-3 record?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.