output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "home_team_score" FROM "round_1" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What did fitzroy score at their home game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did fitzroy score at their home game?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`Which away team played at western oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team played at western oval?`:
```sql
|
SELECT SUM("crowd") FROM "round_1" WHERE "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`How big was the crowd when the opponent was essendon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How big was the crowd when the opponent was essendon?`:
```sql
|
SELECT "surface" FROM "doubles_runner_up" WHERE "partner"='yew-ming si'; |
## Task
Generate a SQL query to answer the following question:
`Which surface had Yew-Ming Si as a partner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_runner_up" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which surface had Yew-Ming Si as a partner?`:
```sql
|
SELECT "result" FROM "labour_targets" WHERE "rank"=1; |
## Task
Generate a SQL query to answer the following question:
`What was the result of rank 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "labour_targets" (
"rank" real,
"constituency" text,
"winning_party_2007" text,
"swing_to_gain" real,
"labour_s_place_2007" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of rank 1?`:
```sql
|
SELECT "type" FROM "stage_results" WHERE "date"='1 june'; |
## Task
Generate a SQL query to answer the following question:
`What type has a date of 1 june?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type has a date of 1 june?`:
```sql
|
SELECT "date" FROM "stage_results" WHERE "type"='hilly stage'; |
## Task
Generate a SQL query to answer the following question:
`What was the date with a hilly stage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date with a hilly stage?`:
```sql
|
SELECT "winner" FROM "stage_results" WHERE "date"='18 may'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the winner on 18 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the winner on 18 may?`:
```sql
|
SELECT "date" FROM "stage_results" WHERE "course"='moena to aprica'; |
## Task
Generate a SQL query to answer the following question:
`What date was moena to aprica the course?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was moena to aprica the course?`:
```sql
|
SELECT "winner" FROM "stage_results" WHERE "type"='plain stage' AND "course"='nola to sora'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the winner with a type of plain stage and a Course of nola to sora?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the winner with a type of plain stage and a Course of nola to sora?`:
```sql
|
SELECT "text_symbol" FROM "colours_and_shapes" WHERE "border"='red' AND "type_of_sign"='warning'; |
## Task
Generate a SQL query to answer the following question:
`Which sign has a red border and a warning sign?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "colours_and_shapes" (
"type_of_sign" text,
"shape" text,
"border" text,
"background_colour" text,
"text_symbol" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which sign has a red border and a warning sign?`:
```sql
|
SELECT "border" FROM "colours_and_shapes" WHERE "background_colour"='yellow' AND "shape"='triangular'; |
## Task
Generate a SQL query to answer the following question:
`Which sign had a yellow background and a triangular shape?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "colours_and_shapes" (
"type_of_sign" text,
"shape" text,
"border" text,
"background_colour" text,
"text_symbol" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which sign had a yellow background and a triangular shape?`:
```sql
|
SELECT "text_symbol" FROM "colours_and_shapes" WHERE "border"='red'; |
## Task
Generate a SQL query to answer the following question:
`Which sign has a red border?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "colours_and_shapes" (
"type_of_sign" text,
"shape" text,
"border" text,
"background_colour" text,
"text_symbol" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which sign has a red border?`:
```sql
|
SELECT "background_colour" FROM "colours_and_shapes" WHERE "type_of_sign"='mandatory instructions'; |
## Task
Generate a SQL query to answer the following question:
`Which color is the background of the mandatory instructions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "colours_and_shapes" (
"type_of_sign" text,
"shape" text,
"border" text,
"background_colour" text,
"text_symbol" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which color is the background of the mandatory instructions?`:
```sql
|
SELECT "background_colour" FROM "colours_and_shapes" WHERE "border"='white' AND "type_of_sign"='information'; |
## Task
Generate a SQL query to answer the following question:
`What is the color of the background of the white border and sign of information?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "colours_and_shapes" (
"type_of_sign" text,
"shape" text,
"border" text,
"background_colour" text,
"text_symbol" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the color of the background of the white border and sign of information?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "home_team_score"='9.10 (64)'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team score when the home team score was 9.10 (64)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the away team score when the home team score was 9.10 (64)?`:
```sql
|
SELECT AVG("total") FROM "medal_table" WHERE "nation"='italy' AND "bronze">1; |
## Task
Generate a SQL query to answer the following question:
`What is the average total of Italy and has a bronze larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"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 of Italy and has a bronze larger than 1?`:
```sql
|
SELECT SUM("gold") FROM "medal_table" WHERE "nation"='russia' AND "rank">1; |
## Task
Generate a SQL query to answer the following question:
`What amount of Gold does Russia have and have a rank larger than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"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 amount of Gold does Russia have and have a rank larger than 1?`:
```sql
|
SELECT SUM("rank") FROM "medal_table" WHERE "total"=1 AND "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the ranks with a total of 1 and silver less than 0.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"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 sum of the ranks with a total of 1 and silver less than 0.`:
```sql
|
SELECT "player" FROM "nfl_draft" WHERE "position"='linebacker' AND "pick">28; |
## Task
Generate a SQL query to answer the following question:
`Which Player is linebacker and has a pick larger than 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" real,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Player is linebacker and has a pick larger than 28?`:
```sql
|
SELECT MIN("round") FROM "nfl_draft" WHERE "player"='melvin johnson'; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest round that Melvin Johnson played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" real,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest round that Melvin Johnson played?`:
```sql
|
SELECT "runner_up" FROM "division_i" WHERE "semi_finalist_num1"='south florida'; |
## Task
Generate a SQL query to answer the following question:
`Who was the runner-up at the South Florida Semi-Finalist #1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the runner-up at the South Florida Semi-Finalist #1?`:
```sql
|
SELECT "champion" FROM "division_i" WHERE "location"='snellville, ga' AND "year"='2006'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Champion in Snellville, GA in 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Champion in Snellville, GA in 2006?`:
```sql
|
SELECT "champion" FROM "division_i" WHERE "runner_up"='elon'; |
## Task
Generate a SQL query to answer the following question:
`Who won when Elon was the runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won when Elon was the runner-up?`:
```sql
|
SELECT "year" FROM "division_i" WHERE "score"='8-5'; |
## Task
Generate a SQL query to answer the following question:
`What year saw a score of 8-5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year saw a score of 8-5?`:
```sql
|
SELECT "semi_finalist_num2" FROM "division_i" WHERE "year"='2007'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Semi-Finalist #2 in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Semi-Finalist #2 in 2007?`:
```sql
|
SELECT "semi_finalist_num2" FROM "division_i" WHERE "year"='2001'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Semi-Finalist #2 in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "division_i" (
"year" text,
"champion" text,
"score" text,
"runner_up" text,
"location" text,
"semi_finalist_num1" text,
"semi_finalist_num2" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Semi-Finalist #2 in 2001?`:
```sql
|
SELECT "tournament" FROM "tournament_results" WHERE "location"='arizona'; |
## Task
Generate a SQL query to answer the following question:
`What tournament is in Arizona?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `What tournament is in Arizona?`:
```sql
|
SELECT "date" FROM "round_1" WHERE "away_team_score"='12.9 (81)'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team have a score of 12.9 (81)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did an away team have a score of 12.9 (81)?`:
```sql
|
SELECT "home_team" FROM "round_1" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team that had an opponent of footscray?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team that had an opponent of footscray?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "crowd">'21,000'; |
## Task
Generate a SQL query to answer the following question:
`Which away team had a crowd bigger than 21,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team had a crowd bigger than 21,000?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team_score"='15.22 (112)'; |
## Task
Generate a SQL query to answer the following question:
`When the home team scored 15.22 (112), what was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the home team scored 15.22 (112), what was the away team?`:
```sql
|
SELECT "home_team" FROM "round_13" WHERE "away_team_score"='7.13 (55)'; |
## Task
Generate a SQL query to answer the following question:
`When the away team scored 7.13 (55), what was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the away team scored 7.13 (55), what was the home team?`:
```sql
|
SELECT "crowd" FROM "round_13" WHERE "away_team_score"='10.8 (68)'; |
## Task
Generate a SQL query to answer the following question:
`When an away team scored 10.8 (68), what was the crowd size?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When an away team scored 10.8 (68), what was the crowd size?`:
```sql
|
SELECT MIN("crowd") FROM "round_13" WHERE "home_team_score"='6.11 (47)'; |
## Task
Generate a SQL query to answer the following question:
`What was the smallest crowd size when a home team scored 6.11 (47)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the smallest crowd size when a home team scored 6.11 (47)?`:
```sql
|
SELECT AVG("rank") FROM "ladies" WHERE "points"<166.96 AND "places"='166'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank for points less than 166.96, and a Places of 166?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank for points less than 166.96, and a Places of 166?`:
```sql
|
SELECT COUNT("rank") FROM "ladies" WHERE "points">120.44 AND "nation"='east germany' AND "sp_fs"=3; |
## Task
Generate a SQL query to answer the following question:
`What is the rank for more than 120.44 points in East Germany and a SP+FS of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank for more than 120.44 points in East Germany and a SP+FS of 3?`:
```sql
|
SELECT COUNT("rank") FROM "ladies" WHERE "places"='233' AND "sp_fs"<27; |
## Task
Generate a SQL query to answer the following question:
`What is the rank when 233 shows for places and SP+FS smaller than 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank when 233 shows for places and SP+FS smaller than 27?`:
```sql
|
SELECT AVG("sp_fs") FROM "ladies" WHERE "name"='denise biellmann' AND "rank">5; |
## Task
Generate a SQL query to answer the following question:
`What is the average SP+FS for Denise Biellmann, and a Rank larger than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average SP+FS for Denise Biellmann, and a Rank larger than 5?`:
```sql
|
SELECT SUM("points") FROM "ladies" WHERE "nation"='east germany' AND "places"='88'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of points for east germany, and a Places of 88?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ladies" (
"rank" real,
"name" text,
"nation" text,
"sp_fs" real,
"points" real,
"places" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of points for east germany, and a Places of 88?`:
```sql
|
SELECT "years" FROM "engines" WHERE "engine"='5.7l hemi v8'; |
## Task
Generate a SQL query to answer the following question:
`what is the years for engin 5.7l hemi v8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"engine" text,
"power" text,
"torque" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the years for engin 5.7l hemi v8?`:
```sql
|
SELECT "years" FROM "engines" WHERE "notes"='laredo, limited, overland' AND "engine"='5.7l hemi v8'; |
## Task
Generate a SQL query to answer the following question:
`what is the years when the notes is laredo, limited, overland and the engine is 5.7l hemi v8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"engine" text,
"power" text,
"torque" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the years when the notes is laredo, limited, overland and the engine is 5.7l hemi v8?`:
```sql
|
SELECT "torque" FROM "engines" WHERE "notes"='laredo, limited, overland' AND "engine"='5.7l hemi v8'; |
## Task
Generate a SQL query to answer the following question:
`what is the torque when the notes are laredo, limited, overland and the engine is 5.7l hemi v8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "engines" (
"years" text,
"engine" text,
"power" text,
"torque" text,
"notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the torque when the notes are laredo, limited, overland and the engine is 5.7l hemi v8?`:
```sql
|
SELECT "driver" FROM "race" WHERE "constructor"='ferrari' AND "laps"=57; |
## Task
Generate a SQL query to answer the following question:
`Who drove the ferrari that went 57 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who drove the ferrari that went 57 laps?`:
```sql
|
SELECT COUNT("place") FROM "men" WHERE "name"='frank kleber' AND "from"<2001; |
## Task
Generate a SQL query to answer the following question:
`What is place number of Frank Kleber who started in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" real,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is place number of Frank Kleber who started in 2001?`:
```sql
|
SELECT "seconds" FROM "men" WHERE "from">1971 AND "place"<2; |
## Task
Generate a SQL query to answer the following question:
`How many seconds did the champion who started in 1971 and placed above 2 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" real,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many seconds did the champion who started in 1971 and placed above 2 have?`:
```sql
|
SELECT SUM("place") FROM "men" WHERE "name"='r. wenzel' AND "until">1934; |
## Task
Generate a SQL query to answer the following question:
`What place did R. Wenzel, who was active after 1934, have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men" (
"place" real,
"name" text,
"from" real,
"until" real,
"titles" real,
"seconds" text,
"thirds" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place did R. Wenzel, who was active after 1934, have?`:
```sql
|
SELECT "time" FROM "mixed_martial_arts_record" WHERE "round"='n/a' AND "opponent"='mikhail ilyukhin'; |
## Task
Generate a SQL query to answer the following question:
`What's the time for a round of n/a when the opponent is mikhail ilyukhin?`
### 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,
"round" text,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the time for a round of n/a when the opponent is mikhail ilyukhin?`:
```sql
|
SELECT "pole_position" FROM "grands_prix" WHERE "grand_prix"='portuguese grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What is the pole position of the Portuguese Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pole position of the Portuguese Grand Prix?`:
```sql
|
SELECT "pole_position" FROM "grands_prix" WHERE "round"=1; |
## Task
Generate a SQL query to answer the following question:
`What is the pole position of the grand prix with 1 round?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pole position of the grand prix with 1 round?`:
```sql
|
SELECT "pole_position" FROM "grands_prix" WHERE "grand_prix"='hungarian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What is the pole position of the Hungarian Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pole position of the Hungarian Grand Prix?`:
```sql
|
SELECT "pole_position" FROM "grands_prix" WHERE "grand_prix"='belgian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What is the pole position of the Belgian Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pole position of the Belgian Grand Prix?`:
```sql
|
SELECT "grand_prix" FROM "grands_prix" WHERE "fastest_lap"='gerhard berger' AND "pole_position"='michael schumacher'; |
## Task
Generate a SQL query to answer the following question:
`What is the grand prix with Gerhard Berger as the fastest lap and Michael Schumacher as the pole position?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grand prix with Gerhard Berger as the fastest lap and Michael Schumacher as the pole position?`:
```sql
|
SELECT "declination_j2000" FROM "6201_6300" WHERE "constellation"='ophiuchus' AND "apparent_magnitude"<8.6 AND "right_ascension_j2000"='16h47m14.5s'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "6201_6300" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s`:
```sql
|
SELECT "right_ascension_j2000" FROM "6201_6300" WHERE "object_type"='globular cluster' AND "apparent_magnitude"=8.5 AND "ngc_number"=6273; |
## Task
Generate a SQL query to answer the following question:
`Tell me the right ascensuon for object type of globular cluster and apparent magnitude of 8.5 and NGC number of 6273`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "6201_6300" (
"ngc_number" real,
"object_type" text,
"constellation" text,
"right_ascension_j2000" text,
"declination_j2000" text,
"apparent_magnitude" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the right ascensuon for object type of globular cluster and apparent magnitude of 8.5 and NGC number of 6273`:
```sql
|
SELECT "date" FROM "round_7" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`When was the game played where St Kilda was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game played where St Kilda was the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_7" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team score with an away team of Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team score with an away team of Melbourne?`:
```sql
|
SELECT AVG("crowd") FROM "round_7" WHERE "home_team_score"='11.14 (80)'; |
## Task
Generate a SQL query to answer the following question:
`What was the average amount of spectators when the home team scored 11.14 (80)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average amount of spectators when the home team scored 11.14 (80)?`:
```sql
|
SELECT "away_team" FROM "round_7" WHERE "home_team_score"='12.19 (91)'; |
## Task
Generate a SQL query to answer the following question:
`Which away team had a home team that scored 12.19 (91)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team had a home team that scored 12.19 (91)?`:
```sql
|
SELECT "away_team" FROM "round_7" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`Which away team played the home team of Footscray?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team played the home team of Footscray?`:
```sql
|
SELECT COUNT("crowd") FROM "round_7" WHERE "away_team_score"='10.12 (72)'; |
## Task
Generate a SQL query to answer the following question:
`How many spectators were present when the away team scored 10.12 (72)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many spectators were present when the away team scored 10.12 (72)?`:
```sql
|
SELECT "age_on_leaving" FROM "list_of_oldest_sitting_m_ps_since_1945" WHERE "political_party"='conservative' AND "left_house"='2001'; |
## Task
Generate a SQL query to answer the following question:
`How old was the conservative party member that left the house in 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_oldest_sitting_m_ps_since_1945" (
"born" text,
"became_oldest_mp" text,
"left_house" text,
"age_on_leaving" text,
"died" text,
"political_party" text
);
### SQL
Given the database schema, here is the SQL query that answers `How old was the conservative party member that left the house in 2001?`:
```sql
|
SELECT MIN("attendance") FROM "regular_season" WHERE "points">14 AND "arena"='staples center'; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest Attendance for the Staples Center Arena when the Points were over 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text,
"arena" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest Attendance for the Staples Center Arena when the Points were over 14?`:
```sql
|
SELECT "leading_scorer" FROM "january" WHERE "date"='12 january 2008'; |
## Task
Generate a SQL query to answer the following question:
`Name the leading scorer for 12 january 2008`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the leading scorer for 12 january 2008`:
```sql
|
SELECT "record" FROM "january" WHERE "date"='21 january 2008'; |
## Task
Generate a SQL query to answer the following question:
`Name the record for 21 january 2008`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the record for 21 january 2008`:
```sql
|
SELECT "date" FROM "round_1" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`what is the date when the away team is melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date when the away team is melbourne?`:
```sql
|
SELECT "home_team" FROM "round_1" WHERE "home_team_score"='18.17 (125)'; |
## Task
Generate a SQL query to answer the following question:
`who is the home team when the home team score is 18.17 (125)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the home team when the home team score is 18.17 (125)?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "venue"='glenferrie oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for the home team for the venue glenferrie oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for the home team for the venue glenferrie oval?`:
```sql
|
SELECT "home_team" FROM "round_1" WHERE "home_team_score"='14.19 (103)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the home team when the home team score is 14.19 (103)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the home team when the home team score is 14.19 (103)?`:
```sql
|
SELECT "venue" FROM "round_1" WHERE "away_team_score"='17.13 (115)'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue when the away team score is 17.13 (115)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue when the away team score is 17.13 (115)?`:
```sql
|
SELECT "away_team_score" FROM "round_11" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was South Melbourne's score when they played as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was South Melbourne's score when they played as the away team?`:
```sql
|
SELECT "crowd" FROM "round_11" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance for the North Melbourne's home game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance for the North Melbourne's home game?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "crowd">'12,000' AND "venue"='brunswick street oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the home team that played at brunswick street oval with a crowd larger than 12,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the home team that played at brunswick street oval with a crowd larger than 12,000?`:
```sql
|
SELECT "venue" FROM "round_18" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the venue where home team st kilda played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the venue where home team st kilda played?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "away_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score that played away team carlton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score that played away team carlton?`:
```sql
|
SELECT "winner" FROM "1980s_bears_11_7" WHERE "attendance">'62,026' AND "year"<1985; |
## Task
Generate a SQL query to answer the following question:
`Who won in the game before 1985 attended by over 62,026?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1980s_bears_11_7" (
"year" real,
"date" text,
"winner" text,
"result" text,
"loser" text,
"attendance" real,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won in the game before 1985 attended by over 62,026?`:
```sql
|
SELECT "ratings" FROM "fox_nbc_era_2001_2006" WHERE "year"<2004 AND "lap_by_lap"='mike joy'; |
## Task
Generate a SQL query to answer the following question:
`When the Year is smaller than 2004, and Mike Joy is the Lap-by-lap, what are the Ratings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fox_nbc_era_2001_2006" (
"year" real,
"network" text,
"lap_by_lap" text,
"s_color_commentator" text,
"pre_race_host" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Year is smaller than 2004, and Mike Joy is the Lap-by-lap, what are the Ratings?`:
```sql
|
SELECT "network" FROM "fox_nbc_era_2001_2006" WHERE "lap_by_lap"='bill weber'; |
## Task
Generate a SQL query to answer the following question:
`Which Network has Bill Weber for the Lap-by-lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fox_nbc_era_2001_2006" (
"year" real,
"network" text,
"lap_by_lap" text,
"s_color_commentator" text,
"pre_race_host" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Network has Bill Weber for the Lap-by-lap?`:
```sql
|
SELECT "pre_race_host" FROM "fox_nbc_era_2001_2006" WHERE "lap_by_lap"='mike joy' AND "year"=2005; |
## Task
Generate a SQL query to answer the following question:
`Who was the Pre-Race Host when Mike Joy was the Lap-by-lap in the Year 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fox_nbc_era_2001_2006" (
"year" real,
"network" text,
"lap_by_lap" text,
"s_color_commentator" text,
"pre_race_host" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the Pre-Race Host when Mike Joy was the Lap-by-lap in the Year 2005?`:
```sql
|
SELECT COUNT("year") FROM "fox_nbc_era_2001_2006" WHERE "ratings"='10.9/23'; |
## Task
Generate a SQL query to answer the following question:
`How many Years have Ratings of 10.9/23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fox_nbc_era_2001_2006" (
"year" real,
"network" text,
"lap_by_lap" text,
"s_color_commentator" text,
"pre_race_host" text,
"ratings" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many Years have Ratings of 10.9/23?`:
```sql
|
SELECT "home_team_score" FROM "round_7" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of lake oval's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of lake oval's score?`:
```sql
|
SELECT "date" FROM "round_7" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`When was victoria park used as a venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was victoria park used as a venue?`:
```sql
|
SELECT "date" FROM "round_7" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`Which date has an Away team of fitzroy?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which date has an Away team of fitzroy?`:
```sql
|
SELECT MAX("crowd") FROM "round_7" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest crowd for a Home team of carlton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest crowd for a Home team of carlton?`:
```sql
|
SELECT AVG("crowd") FROM "round_17" WHERE "away_team_score"='12.9 (81)'; |
## Task
Generate a SQL query to answer the following question:
`When the Away team scored 12.9 (81), what was the average Crowd size?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Away team scored 12.9 (81), what was the average Crowd size?`:
```sql
|
SELECT "date" FROM "round_17" WHERE "home_team_score"='16.10 (106)'; |
## Task
Generate a SQL query to answer the following question:
`When the Home team had a score of 16.10 (106), what was the Date?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Home team had a score of 16.10 (106), what was the Date?`:
```sql
|
SELECT MIN("crowd") FROM "round_17" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`When the Away team is melbourne, what's the lowest Crowd attended?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Away team is melbourne, what's the lowest Crowd attended?`:
```sql
|
SELECT "home_team_score" FROM "round_17" WHERE "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`When the Away team is essendon, what's the Home team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Away team is essendon, what's the Home team score?`:
```sql
|
SELECT "date" FROM "round_17" WHERE "venue"='brunswick street oval'; |
## Task
Generate a SQL query to answer the following question:
`If the Venue is brunswick street oval, what date was the game played ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `If the Venue is brunswick street oval, what date was the game played ?`:
```sql
|
SELECT "first" FROM "olympians" WHERE "country"='trinidad and tobago' AND "last"='hutchinson' AND "year"<2004; |
## Task
Generate a SQL query to answer the following question:
`Name the first for countries of trinidad and tobago for hutchinson for years before 2004`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "olympians" (
"last" text,
"first" text,
"year" real,
"sport" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the first for countries of trinidad and tobago for hutchinson for years before 2004`:
```sql
|
SELECT "sport" FROM "olympians" WHERE "country"='canada' AND "year"=2004; |
## Task
Generate a SQL query to answer the following question:
`Name the sport for canada in 2004`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "olympians" (
"last" text,
"first" text,
"year" real,
"sport" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sport for canada in 2004`:
```sql
|
SELECT "last" FROM "olympians" WHERE "year"<2000 AND "sport"='softball'; |
## Task
Generate a SQL query to answer the following question:
`Name the last for softball before 2000`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "olympians" (
"last" text,
"first" text,
"year" real,
"sport" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the last for softball before 2000`:
```sql
|
SELECT SUM("year") FROM "olympians" WHERE "sport"='swimming' AND "first"='mike'; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of year for swimming and first of mike`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "olympians" (
"last" text,
"first" text,
"year" real,
"sport" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of year for swimming and first of mike`:
```sql
|
SELECT "sport" FROM "olympians" WHERE "country"='puerto rico' AND "year"=2000; |
## Task
Generate a SQL query to answer the following question:
`Name the sport for puerto rico and year of 2000`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "olympians" (
"last" text,
"first" text,
"year" real,
"sport" text,
"country" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sport for puerto rico and year of 2000`:
```sql
|
SELECT COUNT("points") FROM "individual_2007_uci_pro_tour_standings_a" WHERE "team"='discovery channel'; |
## Task
Generate a SQL query to answer the following question:
`Cumulative point total for all teams playing on the Discovery Channel?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Cumulative point total for all teams playing on the Discovery Channel?`:
```sql
|
SELECT "name" FROM "individual_2007_uci_pro_tour_standings_a" WHERE "nationality"='belgium'; |
## Task
Generate a SQL query to answer the following question:
`Which player is from Belgium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "individual_2007_uci_pro_tour_standings_a" (
"rank" real,
"name" text,
"nationality" text,
"team" text,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which player is from Belgium?`:
```sql
|
SELECT "visitor" FROM "december" WHERE "home"='kings'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team that played against the Kings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team that played against the Kings?`:
```sql
|
SELECT "player" FROM "draft_picks" WHERE "round">5 AND "position"='c'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the player for round more than 5 and position of c`
### 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 `Tell me the player for round more than 5 and position of c`:
```sql
|
SELECT "college_junior_club_team_league" FROM "draft_picks" WHERE "player"='carl hagelin'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the college for carl hagelin`
### 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 `Tell me the college for carl hagelin`:
```sql
|
SELECT SUM("from") FROM "l" WHERE "school_country"='la salle' AND "asts"<6; |
## Task
Generate a SQL query to answer the following question:
`What year is the player who attended la salle with under 6 assists from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "l" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What year is the player who attended la salle with under 6 assists from?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.