output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "3_30_pm" FROM "winter_1997_1998" WHERE "2_00_pm"='another world'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE 3:30PM WITH ANOTHER WORLD AT 2:00PM?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winter_1997_1998" (
"7_30_am" text,
"8_00_am" text,
"9_00_am" text,
"11_00_am" text,
"noon" text,
"12_30_pm" text,
"1_00_pm" text,
"1_30_pm" text,
"2_00_pm" text,
"3_00_pm" text,
"3_30_pm" text,
"5_00_pm" text,
"6_30_pm" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE 3:30PM WITH ANOTHER WORLD AT 2:00PM?`:
```sql
|
SELECT "award" FROM "awards" WHERE "result"='nominated' AND "film"='sankranthi'; |
## Task
Generate a SQL query to answer the following question:
`What is Award, when Result is "Nominated", and when Film is "Sankranthi"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"category" text,
"film" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Award, when Result is "Nominated", and when Film is "Sankranthi"?`:
```sql
|
SELECT "award" FROM "awards" WHERE "category"='best actor' AND "year"<1988; |
## Task
Generate a SQL query to answer the following question:
`What is Award, when Category is "Best Actor", and when Year is less than 1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"category" text,
"film" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Award, when Category is "Best Actor", and when Year is less than 1988?`:
```sql
|
SELECT COUNT("year") FROM "awards" WHERE "award"='vamsi berkley award' AND "category"='best actor'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Year, when Award is "Vamsi Berkley Award", and when Category is "Best Actor"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"category" text,
"film" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Year, when Award is "Vamsi Berkley Award", and when Category is "Best Actor"?`:
```sql
|
SELECT "result" FROM "awards" WHERE "film"='dharma chakram' AND "award"='nandi award for best actor'; |
## Task
Generate a SQL query to answer the following question:
`What is Result, when Film is "Dharma Chakram", and when Award is "Nandi Award for Best Actor"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards" (
"year" real,
"award" text,
"category" text,
"film" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Result, when Film is "Dharma Chakram", and when Award is "Nandi Award for Best Actor"?`:
```sql
|
SELECT "opponent" FROM "season_schedule" WHERE "date"='dec 8'; |
## Task
Generate a SQL query to answer the following question:
`What is Opponent, when Date is "Dec 8"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Opponent, when Date is "Dec 8"?`:
```sql
|
SELECT "score" FROM "season_schedule" WHERE "date"='nov 28'; |
## Task
Generate a SQL query to answer the following question:
`What is Score, when Date is "Nov 28"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Score, when Date is "Nov 28"?`:
```sql
|
SELECT "date" FROM "season_schedule" WHERE "score"='80-79'; |
## Task
Generate a SQL query to answer the following question:
`What is Date, when Score is "80-79"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Date, when Score is "80-79"?`:
```sql
|
SELECT "record" FROM "season_schedule" WHERE "opponent"='new york knicks'; |
## Task
Generate a SQL query to answer the following question:
`What is Record, when Opponent is "New York Knicks"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Record, when Opponent is "New York Knicks"?`:
```sql
|
SELECT "score" FROM "season_schedule" WHERE "opponent"='@ new york knicks'; |
## Task
Generate a SQL query to answer the following question:
`What is Score, when Opponent is "@ New York Knicks"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Score, when Opponent is "@ New York Knicks"?`:
```sql
|
SELECT "result" FROM "season_schedule" WHERE "opponent"='rochester royals'; |
## Task
Generate a SQL query to answer the following question:
`What is Result, when Opponent is "Rochester Royals"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Result, when Opponent is "Rochester Royals"?`:
```sql
|
SELECT "result" FROM "friendlies" WHERE "venue"='strathclyde homes stadium'; |
## Task
Generate a SQL query to answer the following question:
`What was the Result at Strathclyde Homes Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "friendlies" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"st_mirren_scorer_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Result at Strathclyde Homes Stadium?`:
```sql
|
SELECT "score" FROM "first_round" WHERE "country"='spain'; |
## Task
Generate a SQL query to answer the following question:
`Name the Score of spain?`
### 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 `Name the Score of spain?`:
```sql
|
SELECT "country" FROM "first_round" WHERE "to_par"='−2'; |
## Task
Generate a SQL query to answer the following question:
`Which Country has a To par of −2? Question 2`
### 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 has a To par of −2? Question 2`:
```sql
|
SELECT "place" FROM "first_round" WHERE "to_par"='−1' AND "player"='don pooley'; |
## Task
Generate a SQL query to answer the following question:
`Which Place has a To par of −1 and don pooley?`
### 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 Place has a To par of −1 and don pooley?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week"=15; |
## Task
Generate a SQL query to answer the following question:
`What is week 15's result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is week 15's result?`:
```sql
|
SELECT AVG("week") FROM "schedule" WHERE "opponent"='cleveland browns'; |
## Task
Generate a SQL query to answer the following question:
`What week did Cleveland Browns played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What week did Cleveland Browns played?`:
```sql
|
SELECT MAX("goals") FROM "squad_information" WHERE "name"='grella'; |
## Task
Generate a SQL query to answer the following question:
`What is the Highest Goals for Grella?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"goals" real,
"transfer_fee" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Highest Goals for Grella?`:
```sql
|
SELECT "notes" FROM "squad_information" WHERE "name"='grella'; |
## Task
Generate a SQL query to answer the following question:
`What is in the Notes for Player Name Grella?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"goals" real,
"transfer_fee" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is in the Notes for Player Name Grella?`:
```sql
|
SELECT "position" FROM "draft_picks" WHERE "round">5 AND "player"='matthew tassone'; |
## Task
Generate a SQL query to answer the following question:
`Who position did matthew tassone who was drafted after round 5 play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who position did matthew tassone who was drafted after round 5 play?`:
```sql
|
SELECT AVG("pct_coal") FROM "production_and_source" WHERE "pct_natural_gas">11.6 AND "electricity_production_kw_h_billion"<'1,053' AND "pct_hydropower"=32; |
## Task
Generate a SQL query to answer the following question:
`what is the average % coal when the % natural gas is more than 11.6, electricity production (kw/h, billion) is less than 1,053 and % hydropower is 32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "production_and_source" (
"country" text,
"electricity_production_kw_h_billion" real,
"pct_coal" real,
"pct_natural_gas" real,
"pct_oil" real,
"pct_hydropower" real,
"pct_other_renewable" real,
"pct_nuclear_power" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average % coal when the % natural gas is more than 11.6, electricity production (kw/h, billion) is less than 1,053 and % hydropower is 32?`:
```sql
|
SELECT MAX("pct_hydropower") FROM "production_and_source" WHERE "pct_oil"<24.5 AND "country"='united arab emirates' AND "pct_nuclear_power"<0; |
## Task
Generate a SQL query to answer the following question:
`what is the highest % hydropower when the % oil is less than 24.5, country is united arab emirates and the % nuclear power is 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "production_and_source" (
"country" text,
"electricity_production_kw_h_billion" real,
"pct_coal" real,
"pct_natural_gas" real,
"pct_oil" real,
"pct_hydropower" real,
"pct_other_renewable" real,
"pct_nuclear_power" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest % hydropower when the % oil is less than 24.5, country is united arab emirates and the % nuclear power is 0?`:
```sql
|
SELECT MAX("pct_hydropower") FROM "production_and_source" WHERE "pct_coal"=4.9 AND "pct_nuclear_power">0; |
## Task
Generate a SQL query to answer the following question:
`what is the highest % hydropower when % coal is 4.9 and % nuclear power is more than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "production_and_source" (
"country" text,
"electricity_production_kw_h_billion" real,
"pct_coal" real,
"pct_natural_gas" real,
"pct_oil" real,
"pct_hydropower" real,
"pct_other_renewable" real,
"pct_nuclear_power" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest % hydropower when % coal is 4.9 and % nuclear power is more than 0?`:
```sql
|
SELECT MAX("electricity_production_kw_h_billion") FROM "production_and_source" WHERE "pct_other_renewable"=0.4 AND "pct_coal"=0 AND "pct_hydropower">99; |
## Task
Generate a SQL query to answer the following question:
`what is the highest electricity production (kw/h, billion) when the % other renewable is 0.4, % coal is 0 and % hydropower is more than 99?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "production_and_source" (
"country" text,
"electricity_production_kw_h_billion" real,
"pct_coal" real,
"pct_natural_gas" real,
"pct_oil" real,
"pct_hydropower" real,
"pct_other_renewable" real,
"pct_nuclear_power" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest electricity production (kw/h, billion) when the % other renewable is 0.4, % coal is 0 and % hydropower is more than 99?`:
```sql
|
SELECT MIN("cdr") FROM "births_and_deaths" WHERE "difference"=112; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest CDR that has 112 as the difference?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_and_deaths" (
"periodo" text,
"births" real,
"deaths" real,
"difference" real,
"cbr" real,
"cdr" real,
"imr" real,
"tfr" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest CDR that has 112 as the difference?`:
```sql
|
SELECT "tfr" FROM "births_and_deaths" WHERE "births"<131 AND "imr"=125; |
## Task
Generate a SQL query to answer the following question:
`What TFR has births less than 131, with 125 as an IMR?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_and_deaths" (
"periodo" text,
"births" real,
"deaths" real,
"difference" real,
"cbr" real,
"cdr" real,
"imr" real,
"tfr" real
);
### SQL
Given the database schema, here is the SQL query that answers `What TFR has births less than 131, with 125 as an IMR?`:
```sql
|
SELECT AVG("deaths") FROM "births_and_deaths" WHERE "imr"='15,0' AND "cdr">'4,0'; |
## Task
Generate a SQL query to answer the following question:
`What average deaths have 15,0 as the IMR, with a CDR greater than 4,0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "births_and_deaths" (
"periodo" text,
"births" real,
"deaths" real,
"difference" real,
"cbr" real,
"cdr" real,
"imr" real,
"tfr" real
);
### SQL
Given the database schema, here is the SQL query that answers `What average deaths have 15,0 as the IMR, with a CDR greater than 4,0?`:
```sql
|
SELECT "player" FROM "2009_draft_picks" WHERE "round"=6; |
## Task
Generate a SQL query to answer the following question:
`Who is the player in round 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player in round 6?`:
```sql
|
SELECT "college_junior_club_team_league" FROM "2009_draft_picks" WHERE "player"='louis leblanc'; |
## Task
Generate a SQL query to answer the following question:
`What college did Louis LeBlanc attend?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009_draft_picks" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team_league" text
);
### SQL
Given the database schema, here is the SQL query that answers `What college did Louis LeBlanc attend?`:
```sql
|
SELECT SUM("goals_against") FROM "group_ii" WHERE "goals_for">52 AND "losses"<10; |
## Task
Generate a SQL query to answer the following question:
`How many goals against total did the team with more than 52 goals and fewer than 10 losses have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many goals against total did the team with more than 52 goals and fewer than 10 losses have?`:
```sql
|
SELECT MIN("draws") FROM "group_ii" WHERE "club"='levante ud' AND "goal_difference"<6; |
## Task
Generate a SQL query to answer the following question:
`What was the low number of draws for Levante Ud when their goal difference was smaller than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the low number of draws for Levante Ud when their goal difference was smaller than 6?`:
```sql
|
SELECT AVG("against") FROM "1969_as_three_leagues_come_together" WHERE "draws"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the average entry in the against column with draws smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1969_as_three_leagues_come_together" (
"portland_dfl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average entry in the against column with draws smaller than 0?`:
```sql
|
SELECT SUM("losses") FROM "1969_as_three_leagues_come_together" WHERE "portland_dfl"='westerns' AND "draws">1; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of losses that has draws larger than 1 and a Portland DFL of westerns?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1969_as_three_leagues_come_together" (
"portland_dfl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of losses that has draws larger than 1 and a Portland DFL of westerns?`:
```sql
|
SELECT SUM("draws") FROM "1969_as_three_leagues_come_together" WHERE "byes">0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of draws for all byes larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1969_as_three_leagues_come_together" (
"portland_dfl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of draws for all byes larger than 0?`:
```sql
|
SELECT SUM("byes") FROM "1969_as_three_leagues_come_together" WHERE "portland_dfl"='westerns' AND "losses">14; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of byes for losses larger than 14 for a Portland DFL of westerns?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1969_as_three_leagues_come_together" (
"portland_dfl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of byes for losses larger than 14 for a Portland DFL of westerns?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "opponentnum"='at 2 usc'; |
## Task
Generate a SQL query to answer the following question:
`What was the result when the opponent was at 2 usc?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when the opponent was at 2 usc?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='10/08/1988'; |
## Task
Generate a SQL query to answer the following question:
`What was the result on 10/08/1988?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result on 10/08/1988?`:
```sql
|
SELECT "rank_num" FROM "schedule" WHERE "result"='w42-14'; |
## Task
Generate a SQL query to answer the following question:
`What was the rank# of the opponent when the result of the game was w42-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank# of the opponent when the result of the game was w42-14?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "attendance"='56,500'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the game that had 56,500 in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the game that had 56,500 in attendance?`:
```sql
|
SELECT "rank_num" FROM "schedule" WHERE "attendance"='93,829'; |
## Task
Generate a SQL query to answer the following question:
`What was the rank# of the opponent when there was 93,829 in attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the rank# of the opponent when there was 93,829 in attendance?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "rank_num"='5' AND "opponentnum"='stanford'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the game played where the opponent was Stanford, ranked #5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"time" text,
"opponentnum" text,
"rank_num" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the game played where the opponent was Stanford, ranked #5?`:
```sql
|
SELECT "number_of_electorates_2009" FROM "assembly_segments" WHERE "reserved_for_sc_st_none"='total:'; |
## Task
Generate a SQL query to answer the following question:
`Which Number of electorates (2009) has a Reserved for (SC / ST /None) of total:?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Number of electorates (2009) has a Reserved for (SC / ST /None) of total:?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "year">1973; |
## Task
Generate a SQL query to answer the following question:
`What tournament took place after 1973?`
### 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 tournament took place after 1973?`:
```sql
|
SELECT "tournament" FROM "achievements" WHERE "extra"='200 m' AND "year"<1972; |
## Task
Generate a SQL query to answer the following question:
`What tournament took place before 1972 with an extra of 200 m?`
### 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 tournament took place before 1972 with an extra of 200 m?`:
```sql
|
SELECT "current_code" FROM "defunct_competitions" WHERE "type"='club trophy' AND "years"='1867 only'; |
## Task
Generate a SQL query to answer the following question:
`What is the current code for the club trophy, in 1867 only?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defunct_competitions" (
"years" text,
"type" text,
"original_code" text,
"current_code" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the current code for the club trophy, in 1867 only?`:
```sql
|
SELECT "location" FROM "defunct_competitions" WHERE "original_code"='victorian rules'; |
## Task
Generate a SQL query to answer the following question:
`What is the location of the original code for victorian rules?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defunct_competitions" (
"years" text,
"type" text,
"original_code" text,
"current_code" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location of the original code for victorian rules?`:
```sql
|
SELECT "location" FROM "defunct_competitions" WHERE "type"='club trophy'; |
## Task
Generate a SQL query to answer the following question:
`What is the location for the club trophy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defunct_competitions" (
"years" text,
"type" text,
"original_code" text,
"current_code" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location for the club trophy?`:
```sql
|
SELECT "location" FROM "defunct_competitions" WHERE "type"='club trophy' AND "years"='1867 only'; |
## Task
Generate a SQL query to answer the following question:
`What is the location for the club trophy from the year 1867 only?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "defunct_competitions" (
"years" text,
"type" text,
"original_code" text,
"current_code" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the location for the club trophy from the year 1867 only?`:
```sql
|
SELECT "score" FROM "singles_8" WHERE "tournament"='tampere , finland'; |
## Task
Generate a SQL query to answer the following question:
`What is Score, when Tournament is "Tampere , Finland"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_8" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Score, when Tournament is "Tampere , Finland"?`:
```sql
|
SELECT "surface" FROM "singles_8" WHERE "opponent"='jiří vaněk'; |
## Task
Generate a SQL query to answer the following question:
`What is Surface, when Opponent is "Jiří Vaněk"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_8" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Surface, when Opponent is "Jiří Vaněk"?`:
```sql
|
SELECT "score" FROM "singles_8" WHERE "opponent"='ivo minář'; |
## Task
Generate a SQL query to answer the following question:
`What is Score, when Opponent is "Ivo Minář"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_8" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Score, when Opponent is "Ivo Minář"?`:
```sql
|
SELECT "score" FROM "singles_8" WHERE "opponent"='daniel gimeno-traver'; |
## Task
Generate a SQL query to answer the following question:
`What is Score, when Opponent is "Daniel Gimeno-Traver"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_8" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Score, when Opponent is "Daniel Gimeno-Traver"?`:
```sql
|
SELECT "tournament" FROM "rapid_games" WHERE "moves"=37 AND "result"='½–½'; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Moves is "37", and when Result is "½–½"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rapid_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Moves is "37", and when Result is "½–½"?`:
```sql
|
SELECT "result" FROM "rapid_games" WHERE "year">1999 AND "white"='kramnik' AND "tournament"='mainz cc champions duel (5)'; |
## Task
Generate a SQL query to answer the following question:
`What is Result, when Year is greater than 1999, when White is "Kramnik", and when Tournament is "Mainz CC Champions Duel (5)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rapid_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Result, when Year is greater than 1999, when White is "Kramnik", and when Tournament is "Mainz CC Champions Duel (5)"?`:
```sql
|
SELECT "opening" FROM "rapid_games" WHERE "white"='kramnik' AND "year"<2001 AND "tournament"='siemens giants'; |
## Task
Generate a SQL query to answer the following question:
`What is Opening, when White is Kramnik, when Year is less than 2001, and when Tournament is "Siemens Giants"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rapid_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Opening, when White is Kramnik, when Year is less than 2001, and when Tournament is "Siemens Giants"?`:
```sql
|
SELECT "tournament" FROM "rapid_games" WHERE "black"='kramnik' AND "result"='½–½' AND "moves"=40; |
## Task
Generate a SQL query to answer the following question:
`What is Tournament, when Black is "Kramnik", when Result is "½–½", and when Moves is "40"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rapid_games" (
"white" text,
"black" text,
"year" real,
"result" text,
"moves" real,
"tournament" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tournament, when Black is "Kramnik", when Result is "½–½", and when Moves is "40"?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_career" WHERE "opponent"='jae young kim'; |
## Task
Generate a SQL query to answer the following question:
`What was the location where the opponent was Jae Young Kim?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_career" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the location where the opponent was Jae Young Kim?`:
```sql
|
SELECT "event" FROM "mixed_martial_arts_career" WHERE "opponent"='jose carlos oliveira'; |
## Task
Generate a SQL query to answer the following question:
`Which event was the opponent jose carlos oliveira?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_career" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which event was the opponent jose carlos oliveira?`:
```sql
|
SELECT "round" FROM "mixed_martial_arts_career" WHERE "opponent"='bobby rehman'; |
## Task
Generate a SQL query to answer the following question:
`How many rounds was the bout against bobby rehman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_career" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many rounds was the bout against bobby rehman?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_career" WHERE "record"='12-5'; |
## Task
Generate a SQL query to answer the following question:
`Where was the location when the record was 12-5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_career" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the location when the record was 12-5?`:
```sql
|
SELECT "dvd_title" FROM "dvd_releases" WHERE "region_1"='n/a' AND "no_of_discs">3; |
## Task
Generate a SQL query to answer the following question:
`Which DVD Title has a Region 1 of n/a and greater than 3 in No. of Discs?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"dvd_title" text,
"no_of_discs" real,
"year" text,
"no_of_episodes" real,
"region_1" text,
"region_2" text,
"region_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which DVD Title has a Region 1 of n/a and greater than 3 in No. of Discs?`:
```sql
|
SELECT "region_1" FROM "dvd_releases" WHERE "no_of_episodes"=12 AND "region_2"='18 august 2008'; |
## Task
Generate a SQL query to answer the following question:
`Which region 1 has 12 Episodes and a Region 2 of 18 August 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "dvd_releases" (
"dvd_title" text,
"no_of_discs" real,
"year" text,
"no_of_episodes" real,
"region_1" text,
"region_2" text,
"region_4" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which region 1 has 12 Episodes and a Region 2 of 18 August 2008?`:
```sql
|
SELECT "tries_for" FROM "league_table" WHERE "tries_against"='140'; |
## Task
Generate a SQL query to answer the following question:
`WHAT TRIES HAVE TRIES AGAINST AT 140?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT TRIES HAVE TRIES AGAINST AT 140?`:
```sql
|
SELECT "tries_against" FROM "league_table" WHERE "played"='22' AND "points_against"='784'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE TRIES AGAINST WITH PLAYED 22, POINTS AGAINST 784?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE TRIES AGAINST WITH PLAYED 22, POINTS AGAINST 784?`:
```sql
|
SELECT "tries_for" FROM "league_table" WHERE "points_for"='190'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE TRIES WITH POINTS 190?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE TRIES WITH POINTS 190?`:
```sql
|
SELECT "points" FROM "league_table" WHERE "tries_for"='55'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE POINTS WITH 55 TRIES?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE POINTS WITH 55 TRIES?`:
```sql
|
SELECT "lost" FROM "league_table" WHERE "losing_bonus"='1' AND "points_for"='148'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE LOST WITH 1 LOSING BONUS, 148 POINTS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE LOST WITH 1 LOSING BONUS, 148 POINTS?`:
```sql
|
SELECT "losing_bonus" FROM "league_table" WHERE "points_for"='190'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE LOSING BONUS WITH 190 POINTS?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE LOSING BONUS WITH 190 POINTS?`:
```sql
|
SELECT SUM("pick") FROM "1954_ohio_state_buckeyes_football_team" WHERE "position"='guard'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the pick of the guard position player?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1954_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the pick of the guard position player?`:
```sql
|
SELECT "nfl_club" FROM "1954_ohio_state_buckeyes_football_team" WHERE "pick"=153; |
## Task
Generate a SQL query to answer the following question:
`What is the NFL club with pick # 153?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1954_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NFL club with pick # 153?`:
```sql
|
SELECT "player" FROM "1954_ohio_state_buckeyes_football_team" WHERE "round"<13 AND "pick"=74; |
## Task
Generate a SQL query to answer the following question:
`Who is the player from a round less than 13 and has a pick of 74?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1954_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player from a round less than 13 and has a pick of 74?`:
```sql
|
SELECT "player" FROM "1954_ohio_state_buckeyes_football_team" WHERE "round"=13 AND "position"='center'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player from round 13 that plays center?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1954_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player from round 13 that plays center?`:
```sql
|
SELECT "nfl_club" FROM "1954_ohio_state_buckeyes_football_team" WHERE "pick"<74 AND "round">2; |
## Task
Generate a SQL query to answer the following question:
`What is the NFL club with a pick less than 74 and a round greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1954_ohio_state_buckeyes_football_team" (
"player" text,
"round" real,
"pick" real,
"position" text,
"nfl_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NFL club with a pick less than 74 and a round greater than 2?`:
```sql
|
SELECT "conference_semifinals" FROM "playoffs" WHERE "record"='55–27'; |
## Task
Generate a SQL query to answer the following question:
`Which Conference Semifinals has a Record of 55–27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"season" text,
"record" text,
"seed" text,
"first_round" text,
"conference_semifinals" text,
"conference_finals" text,
"nba_finals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Conference Semifinals has a Record of 55–27?`:
```sql
|
SELECT "conference_semifinals" FROM "playoffs" WHERE "conference_finals"='† denotes division championship'; |
## Task
Generate a SQL query to answer the following question:
`Which Conference Semifinals has a Conference Finals of † denotes division championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"season" text,
"record" text,
"seed" text,
"first_round" text,
"conference_semifinals" text,
"conference_finals" text,
"nba_finals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Conference Semifinals has a Conference Finals of † denotes division championship?`:
```sql
|
SELECT "conference_finals" FROM "playoffs" WHERE "seed"='† denotes division championship'; |
## Task
Generate a SQL query to answer the following question:
`Which Conference Finals has a Seed of † denotes division championship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"season" text,
"record" text,
"seed" text,
"first_round" text,
"conference_semifinals" text,
"conference_finals" text,
"nba_finals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Conference Finals has a Seed of † denotes division championship?`:
```sql
|
SELECT "rank" FROM "accolades" WHERE "publication"='the observer music monthly'; |
## Task
Generate a SQL query to answer the following question:
`What rank is the publication the observer music monthly?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accolades" (
"publication" text,
"country" text,
"accolade" text,
"year" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank is the publication the observer music monthly?`:
```sql
|
SELECT MAX("year") FROM "accolades" WHERE "publication"='the observer music monthly'; |
## Task
Generate a SQL query to answer the following question:
`What is the publication the observer music monthly highest year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accolades" (
"publication" text,
"country" text,
"accolade" text,
"year" real,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the publication the observer music monthly highest year?`:
```sql
|
SELECT AVG("attendance") FROM "1990s_49ers_17_3" WHERE "venue"='candlestick park' AND "date"='december 27'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Attendance, when Venue is "Candlestick Park", and when Date is "December 27"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s_49ers_17_3" (
"year" real,
"date" text,
"home_team" text,
"result" text,
"visiting_team" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Attendance, when Venue is "Candlestick Park", and when Date is "December 27"?`:
```sql
|
SELECT "result" FROM "1990s_49ers_17_3" WHERE "date"='november 22'; |
## Task
Generate a SQL query to answer the following question:
`What is Result, when Date is "November 22"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s_49ers_17_3" (
"year" real,
"date" text,
"home_team" text,
"result" text,
"visiting_team" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Result, when Date is "November 22"?`:
```sql
|
SELECT AVG("attendance") FROM "1990s_49ers_17_3" WHERE "venue"='candlestick park' AND "date"='november 25'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Attendance, when Venue is "Candlestick Park", and when Date is "November 25"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1990s_49ers_17_3" (
"year" real,
"date" text,
"home_team" text,
"result" text,
"visiting_team" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Attendance, when Venue is "Candlestick Park", and when Date is "November 25"?`:
```sql
|
SELECT "bronze" FROM "women" WHERE "silver"='tatiana ryabkina' AND "gold"='anne margrethe hausken'; |
## Task
Generate a SQL query to answer the following question:
`What bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"year" real,
"gold" text,
"silver" text,
"bronze" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "format"='cd' AND "region"='australia'; |
## Task
Generate a SQL query to answer the following question:
`What label is in CD format in Australia?`
### 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 is in CD format in Australia?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='crg3p-90054'; |
## Task
Generate a SQL query to answer the following question:
`What is the label for catalog number CRG3P-90054?`
### 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 for catalog number CRG3P-90054?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "label"='mca'; |
## Task
Generate a SQL query to answer the following question:
`What is the format for the MCA label?`
### 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 format for the MCA label?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "label"='grilled cheese'; |
## Task
Generate a SQL query to answer the following question:
`What is the catalog number for the Grilled Cheese label?`
### 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 catalog number for the Grilled Cheese label?`:
```sql
|
SELECT "region" FROM "release_history" WHERE "format"='cd' AND "label"='mca'; |
## Task
Generate a SQL query to answer the following question:
`Which region has the format CD and label MCA?`
### 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 `Which region has the format CD and label MCA?`:
```sql
|
SELECT "format" FROM "release_history" WHERE "region"='united states' AND "date"='january 12, 2010' AND "label"='mightier than sword'; |
## Task
Generate a SQL query to answer the following question:
`What is the format for the label Mightier than Sword on January 12, 2010 in the United States?`
### 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 format for the label Mightier than Sword on January 12, 2010 in the United States?`:
```sql
|
SELECT "station" FROM "stations" WHERE "height_above_sea_level_m"='54m' AND "closed"='closed'; |
## Task
Generate a SQL query to answer the following question:
`Which station that sat 54m above seal level is now Closed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"station" text,
"distance_from_wellington" text,
"height_above_sea_level_m" text,
"opened" real,
"closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which station that sat 54m above seal level is now Closed?`:
```sql
|
SELECT "closed" FROM "stations" WHERE "opened"<1877 AND "distance_from_wellington"='2.44km'; |
## Task
Generate a SQL query to answer the following question:
`Opened prior to 1877 only 2.44km from Wellington, when did this station close?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"station" text,
"distance_from_wellington" text,
"height_above_sea_level_m" text,
"opened" real,
"closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `Opened prior to 1877 only 2.44km from Wellington, when did this station close?`:
```sql
|
SELECT "height_above_sea_level_m" FROM "stations" WHERE "opened"<1887 AND "distance_from_wellington"='175.67km'; |
## Task
Generate a SQL query to answer the following question:
`What is the height above sea level for the station opened 175.67km from Wellington prior to 1887?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"station" text,
"distance_from_wellington" text,
"height_above_sea_level_m" text,
"opened" real,
"closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height above sea level for the station opened 175.67km from Wellington prior to 1887?`:
```sql
|
SELECT "height_above_sea_level_m" FROM "stations" WHERE "opened">1876 AND "distance_from_wellington"='604.53km'; |
## Task
Generate a SQL query to answer the following question:
`For the station opened after 1876 at 604.53km from Wellington, what is the height above sea level?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stations" (
"station" text,
"distance_from_wellington" text,
"height_above_sea_level_m" text,
"opened" real,
"closed" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the station opened after 1876 at 604.53km from Wellington, what is the height above sea level?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "attendance"='70,012'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent at the game attended by 70,012?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent at the game attended by 70,012?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "week">2 AND "result"='l 16–10'; |
## Task
Generate a SQL query to answer the following question:
`What is the date of the post-week 2 game with a result of l 16–10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date of the post-week 2 game with a result of l 16–10?`:
```sql
|
SELECT MAX("to_par") FROM "made_the_cut" WHERE "player"='justin leonard' AND "total"<297; |
## Task
Generate a SQL query to answer the following question:
`What is the highest to par number for Justin Leonard when the total is less than 297?`
### 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 highest to par number for Justin Leonard when the total is less than 297?`:
```sql
|
SELECT "total" FROM "made_the_cut" WHERE "finish"='t44'; |
## Task
Generate a SQL query to answer the following question:
`What is the total when the finish was t44?`
### 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 when the finish was t44?`:
```sql
|
SELECT "country" FROM "made_the_cut" WHERE "total">293 AND "to_par"<17; |
## Task
Generate a SQL query to answer the following question:
`What country has a total larger than 293, and a to par less than 17?`
### 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 country has a total larger than 293, and a to par less than 17?`:
```sql
|
SELECT "agg" FROM "eighth_finals" WHERE "team_1"='karaorman'; |
## Task
Generate a SQL query to answer the following question:
`When Karaorman is Team 1, what is the Agg.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `When Karaorman is Team 1, what is the Agg.?`:
```sql
|
SELECT "week_3" FROM "scores" WHERE "week_6"='26.05'; |
## Task
Generate a SQL query to answer the following question:
`What is week 3 when week 6 is 26.05?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scores" (
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is week 3 when week 6 is 26.05?`:
```sql
|
SELECT "week_5" FROM "scores" WHERE "week_2"='36.80' AND "week_4"='39.75'; |
## Task
Generate a SQL query to answer the following question:
`What is week 5 when week 2 is 36.80, and week 4 is 39.75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "scores" (
"week_2" text,
"week_3" text,
"week_4" text,
"week_5" text,
"week_6" text,
"week_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is week 5 when week 2 is 36.80, and week 4 is 39.75?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.