output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "place" FROM "second_round" WHERE "to_par"='–2' AND "player"='johnny miller'; |
## Task
Generate a SQL query to answer the following question:
`With a To par of –2, what is Johnny Miller's Place?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `With a To par of –2, what is Johnny Miller's Place?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "player"='gene borek'; |
## Task
Generate a SQL query to answer the following question:
`From what Country is Gene Borek?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `From what Country is Gene Borek?`:
```sql
|
SELECT "country" FROM "second_round" WHERE "to_par"='–5'; |
## Task
Generate a SQL query to answer the following question:
`What is the Country of the Player with a To par of –5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Country of the Player with a To par of –5?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "country"='new zealand'; |
## Task
Generate a SQL query to answer the following question:
`What is the Place of the Player from New Zealand?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Place of the Player from New Zealand?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "score"='70-68=138'; |
## Task
Generate a SQL query to answer the following question:
`What is the Place of the Player with a Score of 70-68=138?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Place of the Player with a Score of 70-68=138?`:
```sql
|
SELECT MAX("losses") FROM "championship_game_results_by_team" WHERE "wins">1 AND "last_appearance"='2003'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Losses, when Wins is greater than 1, and when Last Appearance is 2003?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_game_results_by_team" (
"appearances" real,
"school" text,
"wins" real,
"losses" real,
"percent" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Losses, when Wins is greater than 1, and when Last Appearance is 2003?`:
```sql
|
SELECT MAX("wins") FROM "championship_game_results_by_team" WHERE "percent"='0.000' AND "school"='oklahoma state' AND "appearances"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Wins, when Percent is 0.000, when School is Oklahoma State, and when Appearances is less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_game_results_by_team" (
"appearances" real,
"school" text,
"wins" real,
"losses" real,
"percent" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest Wins, when Percent is 0.000, when School is Oklahoma State, and when Appearances is less than 1?`:
```sql
|
SELECT COUNT("losses") FROM "championship_game_results_by_team" WHERE "last_appearance"='2003' AND "wins">2; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Losses, when Last Appearance is 2003, and when Wins is greater than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_game_results_by_team" (
"appearances" real,
"school" text,
"wins" real,
"losses" real,
"percent" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Losses, when Last Appearance is 2003, and when Wins is greater than 2?`:
```sql
|
SELECT "last_appearance" FROM "championship_game_results_by_team" WHERE "wins"<1 AND "losses"=1 AND "school"='oklahoma state'; |
## Task
Generate a SQL query to answer the following question:
`What is Last Appearance, when Wins is less than 1, when Losses is 1, and when School is Oklahoma State?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_game_results_by_team" (
"appearances" real,
"school" text,
"wins" real,
"losses" real,
"percent" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Last Appearance, when Wins is less than 1, when Losses is 1, and when School is Oklahoma State?`:
```sql
|
SELECT "college" FROM "draft_picks" WHERE "pick"<145 AND "player"='jeff wilkins'; |
## Task
Generate a SQL query to answer the following question:
`What is College, when Pick is less than 145, and when Player is Jeff Wilkins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is College, when Pick is less than 145, and when Player is Jeff Wilkins?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "college"='illinois state'; |
## Task
Generate a SQL query to answer the following question:
`What is Nationality, and when College is Illinois State?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Nationality, and when College is Illinois State?`:
```sql
|
SELECT "nationality" FROM "draft_picks" WHERE "round"=6; |
## Task
Generate a SQL query to answer the following question:
`What is Nationality, when Round is 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Nationality, when Round is 6?`:
```sql
|
SELECT COUNT("round") FROM "draft_picks" WHERE "college"='northern illinois'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Round, when College is Northern Illinois?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of Round, when College is Northern Illinois?`:
```sql
|
SELECT AVG("bronze") FROM "medal_count_by_country" WHERE "total"=2 AND "silver"<1 AND "gold">1; |
## Task
Generate a SQL query to answer the following question:
`What is the average bronze when the total is 2, silver is less than 1 and gold is more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count_by_country" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average bronze when the total is 2, silver is less than 1 and gold is more than 1?`:
```sql
|
SELECT AVG("silver") FROM "medal_count_by_country" WHERE "total">20; |
## Task
Generate a SQL query to answer the following question:
`what is the average silver when the total is more than 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count_by_country" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average silver when the total is more than 20?`:
```sql
|
SELECT MAX("rank") FROM "medal_count_by_country" WHERE "nation"='united states (usa)' AND "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`what is the highest rank when the nation is united states (usa) and bronze is more than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count_by_country" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest rank when the nation is united states (usa) and bronze is more than 1?`:
```sql
|
SELECT AVG("total") FROM "medal_count_by_country" WHERE "bronze">0 AND "gold"=0 AND "nation"='united states (usa)' AND "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`what is the average total when bronze is more than 0, gold is 0, the nation is united states (usa) and silver is 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count_by_country" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average total when bronze is more than 0, gold is 0, the nation is united states (usa) and silver is 0?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "opponent"='enrique guzman'; |
## Task
Generate a SQL query to answer the following question:
`What was the resolution for the fight against enrique guzman?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the resolution for the fight against enrique guzman?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "record"='8-6'; |
## Task
Generate a SQL query to answer the following question:
`What was the resolution of the fight when Nate Mohr's record was 8-6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the resolution of the fight when Nate Mohr's record was 8-6?`:
```sql
|
SELECT MIN("third") FROM "winners_by_team" WHERE "club"='es sahel' AND "rank"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest number of third place earned for the Es Sahel at a rank less than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_by_team" (
"rank" real,
"club" text,
"winners" real,
"runners_up" real,
"third" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest number of third place earned for the Es Sahel at a rank less than 3?`:
```sql
|
SELECT "club" FROM "winners_by_team" WHERE "runners_up"=1 AND "winners"=0 AND "third"=2; |
## Task
Generate a SQL query to answer the following question:
`Which club has 1 runners-up with 0 winners and 2 third place earned?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners_by_team" (
"rank" real,
"club" text,
"winners" real,
"runners_up" real,
"third" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which club has 1 runners-up with 0 winners and 2 third place earned?`:
```sql
|
SELECT MIN("annual_ridership_2008") FROM "m_etropolitan_r_ailway_p_assenger_t_rans" WHERE "number_of_stations">70 AND "annual_ridership_1998"<'451,971,849'; |
## Task
Generate a SQL query to answer the following question:
`Which Annual ridership (2008) has a Number of stations larger than 70, and an Annual ridership (1998) smaller than 451,971,849?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m_etropolitan_r_ailway_p_assenger_t_rans" (
"line" text,
"operator" text,
"line_length_kilometres" real,
"number_of_stations" real,
"annual_ridership_1998" real,
"annual_ridership_2008" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Annual ridership (2008) has a Number of stations larger than 70, and an Annual ridership (1998) smaller than 451,971,849?`:
```sql
|
SELECT "name" FROM "kabaddi_world_cup" WHERE "bonus">1 AND "only_point">7 AND "total_point"<21; |
## Task
Generate a SQL query to answer the following question:
`What is Name, when Bonus is greater than 1, when Only Point is greater than 7, and when Total Point is less than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kabaddi_world_cup" (
"name" text,
"only_point" real,
"bonus" real,
"catch_taken" real,
"total_point" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Name, when Bonus is greater than 1, when Only Point is greater than 7, and when Total Point is less than 21?`:
```sql
|
SELECT "name" FROM "kabaddi_world_cup" WHERE "only_point">1 AND "catch_taken">3 AND "bonus">4 AND "total_point"<30; |
## Task
Generate a SQL query to answer the following question:
`What is Name, when Only Point is greater than 1, when Catch Taken is greater than 3, when Bonus is greater than 4, and when Total Point is less than 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "kabaddi_world_cup" (
"name" text,
"only_point" real,
"bonus" real,
"catch_taken" real,
"total_point" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Name, when Only Point is greater than 1, when Catch Taken is greater than 3, when Bonus is greater than 4, and when Total Point is less than 30?`:
```sql
|
SELECT COUNT("grid") FROM "moto_gp_classification" WHERE "manufacturer"='ducati' AND "rider"='casey stoner' AND "laps"<27; |
## Task
Generate a SQL query to answer the following question:
`How many grids does Ducati have with Casey Stoner as a rider with fewer than 27 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many grids does Ducati have with Casey Stoner as a rider with fewer than 27 laps?`:
```sql
|
SELECT "manufacturer" FROM "moto_gp_classification" WHERE "time"='+10.142'; |
## Task
Generate a SQL query to answer the following question:
`Which manufacturer has a time of +10.142?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which manufacturer has a time of +10.142?`:
```sql
|
SELECT "time" FROM "moto_gp_classification" WHERE "rider"='loris capirossi'; |
## Task
Generate a SQL query to answer the following question:
`What is Loris Capirossi's time?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is Loris Capirossi's time?`:
```sql
|
SELECT MAX("laps") FROM "race" WHERE "grid">19 AND "time_retired"='fuel'; |
## Task
Generate a SQL query to answer the following question:
`What were the highest laps when the grid was larger than 19 and the time/retired was fuel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the highest laps when the grid was larger than 19 and the time/retired was fuel?`:
```sql
|
SELECT "team" FROM "race" WHERE "laps"=65 AND "grid"<20 AND "driver"='scott pruett'; |
## Task
Generate a SQL query to answer the following question:
`Which team did Scott Pruett drive for when the grid was smaller than 20 and there were 65 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which team did Scott Pruett drive for when the grid was smaller than 20 and there were 65 laps?`:
```sql
|
SELECT COUNT("date") FROM "construction_details" WHERE "boiler_type"='forward topfeed' AND "built_at"='crewe' AND "lot_no"<187; |
## Task
Generate a SQL query to answer the following question:
`What year is the date when the boiler type is forward topfeed, the built at is Crewe, and lot number is less than 187?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "construction_details" (
"br_no" text,
"lot_no" real,
"date" real,
"built_at" text,
"boiler_type" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year is the date when the boiler type is forward topfeed, the built at is Crewe, and lot number is less than 187?`:
```sql
|
SELECT "date" FROM "international_goals" WHERE "goal"=2; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game where Esteban Paredes scored 2 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game where Esteban Paredes scored 2 goals?`:
```sql
|
SELECT MAX("attendance") FROM "schedule" WHERE "opponent"='los angeles rams' AND "week"<11; |
## Task
Generate a SQL query to answer the following question:
`What is the highest attendance when the opponent is the Los Angeles Rams and the week is less than 11?`
### 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 the highest attendance when the opponent is the Los Angeles Rams and the week is less than 11?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "week">7 AND "opponent"='houston oilers'; |
## Task
Generate a SQL query to answer the following question:
`What is the result when the week is greater than 7 and the Houston Oilers were the opponent?`
### 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 the result when the week is greater than 7 and the Houston Oilers were the opponent?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "location_attendance"='izod center 16,911'; |
## Task
Generate a SQL query to answer the following question:
`What is Record, when Location Attendance is "Izod Center 16,911"?`
### 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 is Record, when Location Attendance is "Izod Center 16,911"?`:
```sql
|
SELECT "high_rebounds" FROM "game_log" WHERE "high_assists"='delonte west (10)'; |
## Task
Generate a SQL query to answer the following question:
`What is High Rebounds, when High Assists is "Delonte West (10)"?`
### 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 is High Rebounds, when High Assists is "Delonte West (10)"?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "label"='epic records' AND "format"='cd'; |
## Task
Generate a SQL query to answer the following question:
`What catalog had an Epic Records label in CD format?`
### 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 catalog had an Epic Records label in CD format?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "region"='australia'; |
## Task
Generate a SQL query to answer the following question:
`Which label is 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 `Which label is in Australia?`:
```sql
|
SELECT "record" FROM "boxing_record" WHERE "time"='2:43'; |
## Task
Generate a SQL query to answer the following question:
`The match that lasted 2:43 has what record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"date" text,
"result" text,
"opponent" text,
"venue" text,
"location" text,
"method" text,
"round" real,
"time" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `The match that lasted 2:43 has what record?`:
```sql
|
SELECT "method" FROM "boxing_record" WHERE "venue"='club med sandpiper'; |
## Task
Generate a SQL query to answer the following question:
`The match that was held at Club Med Sandpiper has what method?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"date" text,
"result" text,
"opponent" text,
"venue" text,
"location" text,
"method" text,
"round" real,
"time" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `The match that was held at Club Med Sandpiper has what method?`:
```sql
|
SELECT "record" FROM "boxing_record" WHERE "time"='3:00' AND "venue"='michael''s eighth avenue' AND "opponent"='tim coleman'; |
## Task
Generate a SQL query to answer the following question:
`The match of at Michael's Eighth Avenue venue against Tim Coleman that went 3:00 has what record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"date" text,
"result" text,
"opponent" text,
"venue" text,
"location" text,
"method" text,
"round" real,
"time" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `The match of at Michael's Eighth Avenue venue against Tim Coleman that went 3:00 has what record?`:
```sql
|
SELECT "method" FROM "boxing_record" WHERE "venue"='club med sandpiper'; |
## Task
Generate a SQL query to answer the following question:
`What method did the match at Club Med Sandpiper have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing_record" (
"date" text,
"result" text,
"opponent" text,
"venue" text,
"location" text,
"method" text,
"round" real,
"time" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What method did the match at Club Med Sandpiper have?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "catalog"='lpm-2899'; |
## Task
Generate a SQL query to answer the following question:
`What is the Label of the release with Catalog number LPM-2899?`
### 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 of the release with Catalog number LPM-2899?`:
```sql
|
SELECT "date" FROM "release_history" WHERE "label"='rca' AND "catalog"='sf-7635'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of the RCA release with Catalog number SF-7635?`
### 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 Date of the RCA release with Catalog number SF-7635?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "label"='rca'; |
## Task
Generate a SQL query to answer the following question:
`What is the Catalog of the RCA release?`
### 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 of the RCA release?`:
```sql
|
SELECT "catalog" FROM "release_history" WHERE "format"='cd reissue' AND "label"='universal'; |
## Task
Generate a SQL query to answer the following question:
`What is the Catalog number of the CD Reissue Universal release?`
### 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 of the CD Reissue Universal release?`:
```sql
|
SELECT "label" FROM "release_history" WHERE "format"='stereo vinyl lp' AND "catalog"='sf-7635'; |
## Task
Generate a SQL query to answer the following question:
`What is the Label of the release on Stereo vinyl LP with Catalog number SF-7635?`
### 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 of the release on Stereo vinyl LP with Catalog number SF-7635?`:
```sql
|
SELECT "university" FROM "taiwan" WHERE "median_ranks">4 AND "2009_qs_asian_rankings_int_l_student_review">268; |
## Task
Generate a SQL query to answer the following question:
`What university has a 2009 int'l student review greater than 268 and median rank greater than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taiwan" (
"2010_arwu_rankings" text,
"2010_qs_world_rankings" text,
"2010_qs_asian_rankings" text,
"2010_eduniversal_rankings" text,
"2009_qs_asian_rankings_int_l_faculty_review" text,
"2009_qs_asian_rankings_int_l_student_review" real,
"2000_singapore_asiaweek_rankings" text,
"university" text,
"local" text,
"median_ranks" real
);
### SQL
Given the database schema, here is the SQL query that answers `What university has a 2009 int'l student review greater than 268 and median rank greater than 4?`:
```sql
|
SELECT "2010_arwu_rankings" FROM "taiwan" WHERE "2000_singapore_asiaweek_rankings"='none' AND "median_ranks"<10 AND "2009_qs_asian_rankings_int_l_student_review"=144; |
## Task
Generate a SQL query to answer the following question:
`What's the ARWU ranking that has the int' student review of 144, a median rank of less than 10, and 2000 Singapore “Asiaweek” of none?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taiwan" (
"2010_arwu_rankings" text,
"2010_qs_world_rankings" text,
"2010_qs_asian_rankings" text,
"2010_eduniversal_rankings" text,
"2009_qs_asian_rankings_int_l_faculty_review" text,
"2009_qs_asian_rankings_int_l_student_review" real,
"2000_singapore_asiaweek_rankings" text,
"university" text,
"local" text,
"median_ranks" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the ARWU ranking that has the int' student review of 144, a median rank of less than 10, and 2000 Singapore “Asiaweek” of none?`:
```sql
|
SELECT "local" FROM "taiwan" WHERE "2010_eduniversal_rankings"='none' AND "2010_arwu_rankings"='none' AND "2009_qs_asian_rankings_int_l_student_review"<320; |
## Task
Generate a SQL query to answer the following question:
`Name the local that has the Int'l student review less than 320 and 2010 Eduniversal ranking of none.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taiwan" (
"2010_arwu_rankings" text,
"2010_qs_world_rankings" text,
"2010_qs_asian_rankings" text,
"2010_eduniversal_rankings" text,
"2009_qs_asian_rankings_int_l_faculty_review" text,
"2009_qs_asian_rankings_int_l_student_review" real,
"2000_singapore_asiaweek_rankings" text,
"university" text,
"local" text,
"median_ranks" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the local that has the Int'l student review less than 320 and 2010 Eduniversal ranking of none.`:
```sql
|
SELECT SUM("2009_qs_asian_rankings_int_l_student_review") FROM "taiwan" WHERE "2010_qs_asian_rankings"='none'; |
## Task
Generate a SQL query to answer the following question:
`What's the int'l student review that has the 2010 QS Rank of none?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taiwan" (
"2010_arwu_rankings" text,
"2010_qs_world_rankings" text,
"2010_qs_asian_rankings" text,
"2010_eduniversal_rankings" text,
"2009_qs_asian_rankings_int_l_faculty_review" text,
"2009_qs_asian_rankings_int_l_student_review" real,
"2000_singapore_asiaweek_rankings" text,
"university" text,
"local" text,
"median_ranks" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the int'l student review that has the 2010 QS Rank of none?`:
```sql
|
SELECT "university" FROM "taiwan" WHERE "2009_qs_asian_rankings_int_l_student_review"=195; |
## Task
Generate a SQL query to answer the following question:
`What university has an int'l student review of 195?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "taiwan" (
"2010_arwu_rankings" text,
"2010_qs_world_rankings" text,
"2010_qs_asian_rankings" text,
"2010_eduniversal_rankings" text,
"2009_qs_asian_rankings_int_l_faculty_review" text,
"2009_qs_asian_rankings_int_l_student_review" real,
"2000_singapore_asiaweek_rankings" text,
"university" text,
"local" text,
"median_ranks" real
);
### SQL
Given the database schema, here is the SQL query that answers `What university has an int'l student review of 195?`:
```sql
|
SELECT "other" FROM "polling" WHERE "margin_of_error"='± 4.5%' AND "pat_toomey_r"='45%' AND "joe_sestak_d"='38%'; |
## Task
Generate a SQL query to answer the following question:
`WHAT CANDIDATE HAD A MARGIN OF ERROR OF ± 4.5%, WHEN PAT TOOMEY WAS 45% AND JOE SESTAK WAS 38%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"poll_source" text,
"date_s_administered" text,
"sample_size" real,
"margin_of_error" text,
"joe_sestak_d" text,
"pat_toomey_r" text,
"other" text,
"undecided" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT CANDIDATE HAD A MARGIN OF ERROR OF ± 4.5%, WHEN PAT TOOMEY WAS 45% AND JOE SESTAK WAS 38%?`:
```sql
|
SELECT "date_s_administered" FROM "polling" WHERE "joe_sestak_d"='46%' AND "margin_of_error"='± 3.0%'; |
## Task
Generate a SQL query to answer the following question:
`WHAT DATE DID JOE SESTAK HAVE 46% WITH ± 3.0% MARGIN OF ERROR?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"poll_source" text,
"date_s_administered" text,
"sample_size" real,
"margin_of_error" text,
"joe_sestak_d" text,
"pat_toomey_r" text,
"other" text,
"undecided" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT DATE DID JOE SESTAK HAVE 46% WITH ± 3.0% MARGIN OF ERROR?`:
```sql
|
SELECT "points_pct" FROM "solheim_cup_record" WHERE "total_w_l_h"='1-2-2'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE POINTS PERCENTAGE WITH A TOTAL OF 1-2-2 RECORD?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "solheim_cup_record" (
"year" text,
"total_matches" real,
"total_w_l_h" text,
"singles_w_l_h" text,
"points_won" real,
"points_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE POINTS PERCENTAGE WITH A TOTAL OF 1-2-2 RECORD?`:
```sql
|
SELECT "year" FROM "solheim_cup_record" WHERE "total_matches"=5; |
## Task
Generate a SQL query to answer the following question:
`WHAT YEAR HAD 5 TOTAL MATCHES?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "solheim_cup_record" (
"year" text,
"total_matches" real,
"total_w_l_h" text,
"singles_w_l_h" text,
"points_won" real,
"points_pct" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT YEAR HAD 5 TOTAL MATCHES?`:
```sql
|
SELECT "quantity_preserved" FROM "class_f_2_8_0" WHERE "quantity_made"='4' AND "class"='f-21'; |
## Task
Generate a SQL query to answer the following question:
`What is the quantity preserved when 4 were made of class F-21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_f_2_8_0" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the quantity preserved when 4 were made of class F-21?`:
```sql
|
SELECT "fleet_number_s" FROM "class_f_2_8_0" WHERE "quantity_made"='3'; |
## Task
Generate a SQL query to answer the following question:
`What fleet number had 3 made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_f_2_8_0" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What fleet number had 3 made?`:
```sql
|
SELECT "class" FROM "class_f_2_8_0" WHERE "quantity_made"='1' AND "fleet_number_s"='406'; |
## Task
Generate a SQL query to answer the following question:
`What class had 1 made and fleet number of 406?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_f_2_8_0" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What class had 1 made and fleet number of 406?`:
```sql
|
SELECT "class" FROM "class_f_2_8_0" WHERE "quantity_preserved"='0' AND "quantity_made"='2'; |
## Task
Generate a SQL query to answer the following question:
`What class has 0 preserved and 2 made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "class_f_2_8_0" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text
);
### SQL
Given the database schema, here is the SQL query that answers `What class has 0 preserved and 2 made?`:
```sql
|
SELECT MIN("rank") FROM "largest_cities_proper_by_population" WHERE "population"='4839400'; |
## Task
Generate a SQL query to answer the following question:
`What rank has a population of 4839400?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_cities_proper_by_population" (
"rank" real,
"city" text,
"population" text,
"definition" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank has a population of 4839400?`:
```sql
|
SELECT "rank" FROM "largest_cities_proper_by_population" WHERE "definition"='province-level municipality'; |
## Task
Generate a SQL query to answer the following question:
`What's the rank of the Province-Level Municipality?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_cities_proper_by_population" (
"rank" real,
"city" text,
"population" text,
"definition" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the rank of the Province-Level Municipality?`:
```sql
|
SELECT MAX("rank") FROM "largest_cities_proper_by_population" WHERE "definition"='core districts + inner suburbs' AND "population"='10123000'; |
## Task
Generate a SQL query to answer the following question:
`What rank was Core Districts + Inner Suburbs and had a population of 10123000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "largest_cities_proper_by_population" (
"rank" real,
"city" text,
"population" text,
"definition" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `What rank was Core Districts + Inner Suburbs and had a population of 10123000?`:
```sql
|
SELECT "points" FROM "group_ii" WHERE "draws"<7 AND "wins"<16 AND "goals_for"=35; |
## Task
Generate a SQL query to answer the following question:
`What is Points, when Draws is less than 7, when Wins is less than 16, and when Goals For is "35"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is Points, when Draws is less than 7, when Wins is less than 16, and when Goals For is "35"?`:
```sql
|
SELECT COUNT("losses") FROM "group_ii" WHERE "position">8 AND "goals_for">34 AND "points"=25 AND "draws"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Losses, when Position is greater than 8, when Goals For is greater than 34, when Points is "25", and when Draws is less than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is the total number of Losses, when Position is greater than 8, when Goals For is greater than 34, when Points is "25", and when Draws is less than 5?`:
```sql
|
SELECT AVG("wins") FROM "group_ii" WHERE "points"<19; |
## Task
Generate a SQL query to answer the following question:
`What is the average Wins, when Points is less than "19"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is the average Wins, when Points is less than "19"?`:
```sql
|
SELECT MIN("goals_for") FROM "group_ii" WHERE "played">30; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Goals, when Played is greater than 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is the lowest Goals, when Played is greater than 30?`:
```sql
|
SELECT SUM("played") FROM "group_ii" WHERE "losses"=13 AND "position">11; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Played, when Losses is "13", and when Position is greater than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is the sum of Played, when Losses is "13", and when Position is greater than 11?`:
```sql
|
SELECT MIN("wins") FROM "group_ii" WHERE "losses"<10 AND "goal_difference"<46 AND "goals_for"<63 AND "played"<30; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Wins, when Losses is less than 10, when Goal Difference is less than 46, when Goals is less than 63, and when Played is less than 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_ii" (
"position" real,
"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 is the lowest Wins, when Losses is less than 10, when Goal Difference is less than 46, when Goals is less than 63, and when Played is less than 30?`:
```sql
|
SELECT COUNT("viewers") FROM "season_1_2008_2009_weekly_ratings" WHERE "episode"='gary gets boundaries'; |
## Task
Generate a SQL query to answer the following question:
`How many viewed the episode gary gets boundaries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_1_2008_2009_weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"18_49" text,
"viewers" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many viewed the episode gary gets boundaries?`:
```sql
|
SELECT "episode" FROM "season_1_2008_2009_weekly_ratings" WHERE "viewers"=6.71; |
## Task
Generate a SQL query to answer the following question:
`What episode had 6.71 viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_1_2008_2009_weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"18_49" text,
"viewers" real
);
### SQL
Given the database schema, here is the SQL query that answers `What episode had 6.71 viewers?`:
```sql
|
SELECT "air_date" FROM "season_1_2008_2009_weekly_ratings" WHERE "viewers"=7.3; |
## Task
Generate a SQL query to answer the following question:
`When did the episode air that had 7.3 viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_1_2008_2009_weekly_ratings" (
"episode" text,
"air_date" text,
"timeslot" text,
"18_49" text,
"viewers" real
);
### SQL
Given the database schema, here is the SQL query that answers `When did the episode air that had 7.3 viewers?`:
```sql
|
SELECT SUM("march") FROM "schedule_and_results" WHERE "record"='48-13-11' AND "game"<72; |
## Task
Generate a SQL query to answer the following question:
`What day in March is the game with a 48-13-11 record and a game number less than 72?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What day in March is the game with a 48-13-11 record and a game number less than 72?`:
```sql
|
SELECT "opponent" FROM "schedule_and_results" WHERE "game"=75; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent of game 75?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent of game 75?`:
```sql
|
SELECT MIN("game") FROM "schedule_and_results" WHERE "march">2 AND "opponent"='minnesota north stars'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest game number of the game after March 2 with the minnesota north stars as the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest game number of the game after March 2 with the minnesota north stars as the opponent?`:
```sql
|
SELECT "location_state" FROM "race_calendar" WHERE "winner"='craig lowndes'; |
## Task
Generate a SQL query to answer the following question:
`The winner, Craig Lowndes, was in what location/state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `The winner, Craig Lowndes, was in what location/state?`:
```sql
|
SELECT "date" FROM "race_calendar" WHERE "circuit"='eastern creek raceway'; |
## Task
Generate a SQL query to answer the following question:
`The Eastern Creek Raceway circuit is on what date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `The Eastern Creek Raceway circuit is on what date?`:
```sql
|
SELECT "location_state" FROM "race_calendar" WHERE "team"='castrol perkins motorsport' AND "winner"='russell ingall'; |
## Task
Generate a SQL query to answer the following question:
`Castrol Perkins Motorsport and the winner Russell Ingall was in what location/state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_calendar" (
"circuit" text,
"location_state" text,
"date" text,
"winner" text,
"team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Castrol Perkins Motorsport and the winner Russell Ingall was in what location/state?`:
```sql
|
SELECT "1998" FROM "singles_performance_timeline" WHERE "1996"='1r' AND "2002"='not held'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 1998 when 1996 is 1R, and 2002 is not held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for 1998 when 1996 is 1R, and 2002 is not held?`:
```sql
|
SELECT "1996" FROM "singles_performance_timeline" WHERE "1994"='a' AND "2003"='a' AND "2001"='1r'; |
## Task
Generate a SQL query to answer the following question:
`What is the 1996 when the 1994 is A, the 2003 is A, and the 2001 is 1R?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1996 when the 1994 is A, the 2003 is A, and the 2001 is 1R?`:
```sql
|
SELECT "1991" FROM "singles_performance_timeline" WHERE "2002"='2r'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 1991 when 2002 is 2R?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for 1991 when 2002 is 2R?`:
```sql
|
SELECT "2006" FROM "singles_performance_timeline" WHERE "1990"='grand slam tournaments'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2006 when 1999 is Grand Slam Tournaments?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for 2006 when 1999 is Grand Slam Tournaments?`:
```sql
|
SELECT "2006" FROM "singles_performance_timeline" WHERE "2000"='1r' AND "1996"='a' AND "tournament"='cincinnati masters'; |
## Task
Generate a SQL query to answer the following question:
`What shows for 2006 when 2000 is 1r, 1996 is A, and Tournament is Cincinnati Masters?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What shows for 2006 when 2000 is 1r, 1996 is A, and Tournament is Cincinnati Masters?`:
```sql
|
SELECT "tournament" FROM "singles_performance_timeline" WHERE "1990"='olympic games'; |
## Task
Generate a SQL query to answer the following question:
`What is the Tournament when the 1990 is Olympic Games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Tournament when the 1990 is Olympic Games?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_record" WHERE "record"='0-1'; |
## Task
Generate a SQL query to answer the following question:
`Which Location has a Record of 0-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"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 Location has a Record of 0-1?`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "method"='technical submission (rear naked choke)'; |
## Task
Generate a SQL query to answer the following question:
`What is Record, when Method is "Technical Submission (Rear Naked Choke)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"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 is Record, when Method is "Technical Submission (Rear Naked Choke)"?`:
```sql
|
SELECT SUM("round") FROM "mixed_martial_arts_record" WHERE "method"='submission (banana split)'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Round(s), when Method is "Submission (Banana Split)"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"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 is the sum of Round(s), when Method is "Submission (Banana Split)"?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='gcm: demolition 1'; |
## Task
Generate a SQL query to answer the following question:
`What is Time, when Event is "GCM: Demolition 1"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"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 is Time, when Event is "GCM: Demolition 1"?`:
```sql
|
SELECT "year" FROM "partial_discography" WHERE "title"='\"the 12 year old boy\"'; |
## Task
Generate a SQL query to answer the following question:
`Which year was "the 12 year old boy" performed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partial_discography" (
"year" real,
"title" text,
"performer" text,
"label" text,
"cat_no" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which year was "the 12 year old boy" performed?`:
```sql
|
SELECT COUNT("year_set") FROM "canadian_records" WHERE "event"='100m freestyle'; |
## Task
Generate a SQL query to answer the following question:
`What year had a 100m freestyle event?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_records" (
"event" text,
"long_course_short_course" text,
"year_set" real,
"time" text,
"meet" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year had a 100m freestyle event?`:
```sql
|
SELECT "event" FROM "canadian_records" WHERE "long_course_short_course"='short course' AND "year_set"=2010; |
## Task
Generate a SQL query to answer the following question:
`What event had a short course in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_records" (
"event" text,
"long_course_short_course" text,
"year_set" real,
"time" text,
"meet" text
);
### SQL
Given the database schema, here is the SQL query that answers `What event had a short course in 2010?`:
```sql
|
SELECT COUNT("year_set") FROM "canadian_records" WHERE "long_course_short_course"='short course' AND "time"='7:51.80'; |
## Task
Generate a SQL query to answer the following question:
`What year did a short course have a time of 7:51.80?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_records" (
"event" text,
"long_course_short_course" text,
"year_set" real,
"time" text,
"meet" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year did a short course have a time of 7:51.80?`:
```sql
|
SELECT MAX("year_set") FROM "canadian_records" WHERE "event"='100m freestyle'; |
## Task
Generate a SQL query to answer the following question:
`What was the latest year that had a 100m freestyle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "canadian_records" (
"event" text,
"long_course_short_course" text,
"year_set" real,
"time" text,
"meet" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the latest year that had a 100m freestyle?`:
```sql
|
SELECT "place" FROM "national_final_29_march_1992" WHERE "draw"=3; |
## Task
Generate a SQL query to answer the following question:
`In what place was the song that had a draw of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what place was the song that had a draw of 3?`:
```sql
|
SELECT MIN("points") FROM "national_final_29_march_1992" WHERE "place"='7th' AND "draw">8; |
## Task
Generate a SQL query to answer the following question:
`What is the number of points for the 7th placed song with a draw greater than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of points for the 7th placed song with a draw greater than 8?`:
```sql
|
SELECT COUNT("points") FROM "national_final_29_march_1992" WHERE "artist"='joe o''meara'; |
## Task
Generate a SQL query to answer the following question:
`How many points did Joe O'Meara have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did Joe O'Meara have?`:
```sql
|
SELECT AVG("draw") FROM "national_final_29_march_1992" WHERE "place"='2nd' AND "song"='\"feel the pain\"' AND "points">79; |
## Task
Generate a SQL query to answer the following question:
`What was the draw for "Feel The Pain" which placed in 2nd and had more than 79 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the draw for "Feel The Pain" which placed in 2nd and had more than 79 points?`:
```sql
|
SELECT COUNT("points") FROM "national_final_29_march_1992" WHERE "artist"='linda martin'; |
## Task
Generate a SQL query to answer the following question:
`How many points did Linda Martin have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did Linda Martin have?`:
```sql
|
SELECT "place" FROM "national_final_29_march_1992" WHERE "song"='\"feel the pain\"'; |
## Task
Generate a SQL query to answer the following question:
`In what place did "feel the pain" come in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "national_final_29_march_1992" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what place did "feel the pain" come in?`:
```sql
|
SELECT "score" FROM "season_schedule" WHERE "week">13 AND "visitor"='montreal alouettes'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE SCORE WITH A WEEK LARGER THAN 13, AND VISITOR TEAM MONTREAL ALOUETTES?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE SCORE WITH A WEEK LARGER THAN 13, AND VISITOR TEAM MONTREAL ALOUETTES?`:
```sql
|
SELECT AVG("week") FROM "season_schedule" WHERE "date"='july 25'; |
## Task
Generate a SQL query to answer the following question:
`WHAT IS THE AVERAGE WEEK WITH A DATE OF JULY 25?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `WHAT IS THE AVERAGE WEEK WITH A DATE OF JULY 25?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.