output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "kaz_hayashi" FROM "2009" WHERE "block_a"='shuji kondo'; |
## Task
Generate a SQL query to answer the following question:
`Name the kaz hayashi with block A of Shuji Kondo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"block_a" text,
"kaz_hayashi" text,
"nosawa_rongai" text,
"super_crazy" text,
"toshizo" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the kaz hayashi with block A of Shuji Kondo`:
```sql
|
SELECT "block_a" FROM "2009" WHERE "toshizo"='shuji kondo'; |
## Task
Generate a SQL query to answer the following question:
`Name the block A for shuji kondo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"block_a" text,
"kaz_hayashi" text,
"nosawa_rongai" text,
"super_crazy" text,
"toshizo" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the block A for shuji kondo`:
```sql
|
SELECT "nosawa_rongai" FROM "2009" WHERE "block_a"='petey williams'; |
## Task
Generate a SQL query to answer the following question:
`Name the NOSAWA Rongai for petey williams`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2009" (
"block_a" text,
"kaz_hayashi" text,
"nosawa_rongai" text,
"super_crazy" text,
"toshizo" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the NOSAWA Rongai for petey williams`:
```sql
|
SELECT MAX("winner_s_share") FROM "winners" WHERE "year"='2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest winner's share in 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"dates" text,
"champion" text,
"country" text,
"score" text,
"tournament_location" text,
"purse" real,
"winner_s_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest winner's share in 2008?`:
```sql
|
SELECT "score" FROM "winners" WHERE "champion"='nannette hill'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when Nannette Hill was the champion?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" text,
"dates" text,
"champion" text,
"country" text,
"score" text,
"tournament_location" text,
"purse" real,
"winner_s_share" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when Nannette Hill was the champion?`:
```sql
|
SELECT "date" FROM "round_20" WHERE "away_team_score"='9.10 (64)'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the away team have a score of 9.10 (64)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"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 `On what date did the away team have a score of 9.10 (64)`:
```sql
|
SELECT "home_team_score" FROM "round_20" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What score did the opposing home team have against Melbourne`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"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 score did the opposing home team have against Melbourne`:
```sql
|
SELECT "home_team_score" FROM "round_20" WHERE "away_team_score"='14.12 (96)'; |
## Task
Generate a SQL query to answer the following question:
`Name the home team in a game where the away team's score was 14.12 (96)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"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 `Name the home team in a game where the away team's score was 14.12 (96)`:
```sql
|
SELECT "venue" FROM "round_20" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`Name the venue where St Kilda was the opposing away team`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"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 `Name the venue where St Kilda was the opposing away team`:
```sql
|
SELECT AVG("crowd") FROM "round_8" WHERE "home_team_score"='11.13 (79)'; |
## Task
Generate a SQL query to answer the following question:
`Which Crowd has a Home team score of 11.13 (79)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 Crowd has a Home team score of 11.13 (79)?`:
```sql
|
SELECT "date" FROM "round_8" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Venue of lake oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 a Venue of lake oval?`:
```sql
|
SELECT SUM("crowd") FROM "round_8" WHERE "away_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`Which Crowd has an Away team of collingwood?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"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 Crowd has an Away team of collingwood?`:
```sql
|
SELECT "development_rate" FROM "current_and_past_rates" WHERE "16_17_year_olds_rate"='£3.53' AND "adult_rate"='£5.73'; |
## Task
Generate a SQL query to answer the following question:
`What is the development rate for wages with a 16-17 year old rate of £3.53, and an Adult Rate of £5.73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_and_past_rates" (
"from" text,
"adult_rate" text,
"development_rate" text,
"16_17_year_olds_rate" text,
"apprentice_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the development rate for wages with a 16-17 year old rate of £3.53, and an Adult Rate of £5.73?`:
```sql
|
SELECT "adult_rate" FROM "current_and_past_rates" WHERE "16_17_year_olds_rate"='£3.40'; |
## Task
Generate a SQL query to answer the following question:
`What was the adult rate when the 16-17 year old rate was £3.40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_and_past_rates" (
"from" text,
"adult_rate" text,
"development_rate" text,
"16_17_year_olds_rate" text,
"apprentice_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the adult rate when the 16-17 year old rate was £3.40?`:
```sql
|
SELECT "from" FROM "current_and_past_rates" WHERE "16_17_year_olds_rate"='£3.40'; |
## Task
Generate a SQL query to answer the following question:
`When was the rate for 16-17 year olds £3.40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_and_past_rates" (
"from" text,
"adult_rate" text,
"development_rate" text,
"16_17_year_olds_rate" text,
"apprentice_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the rate for 16-17 year olds £3.40?`:
```sql
|
SELECT "from" FROM "current_and_past_rates" WHERE "development_rate"='£4.92'; |
## Task
Generate a SQL query to answer the following question:
`When was there a development rate of £4.92?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_and_past_rates" (
"from" text,
"adult_rate" text,
"development_rate" text,
"16_17_year_olds_rate" text,
"apprentice_rate" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was there a development rate of £4.92?`:
```sql
|
SELECT AVG("rd_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "player"='steve hazlett' AND "pl_gp"<0; |
## Task
Generate a SQL query to answer the following question:
`When Steve Hazlett is the Player, and the PI GP is under 0, what is the average Rd #?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `When Steve Hazlett is the Player, and the PI GP is under 0, what is the average Rd #?`:
```sql
|
SELECT "player" FROM "list_of_vancouver_canucks_draft_picks" WHERE "pl_gp">0 AND "rd_num"=1; |
## Task
Generate a SQL query to answer the following question:
`Which Player has a PI GP over 0 and a Rd # of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Player has a PI GP over 0 and a Rd # of 1?`:
```sql
|
SELECT MAX("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num"<1; |
## Task
Generate a SQL query to answer the following question:
`Which Pick # is the highest and has the Rd # is under 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Pick # is the highest and has the Rd # is under 1?`:
```sql
|
SELECT MIN("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"=1 AND "player"='murray bannerman' AND "pick_num"<58; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest PI GP when the Reg GP is 1, Murray Bannerman is the Player, and the Pick # is under 58?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_vancouver_canucks_draft_picks" (
"rd_num" real,
"pick_num" real,
"player" text,
"team_league" text,
"reg_gp" real,
"pl_gp" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest PI GP when the Reg GP is 1, Murray Bannerman is the Player, and the Pick # is under 58?`:
```sql
|
SELECT AVG("top_25") FROM "summary" WHERE "events"=5 AND "cuts_made"<3; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average top 25 with events of 5 and cuts madde less than 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average top 25 with events of 5 and cuts madde less than 3`:
```sql
|
SELECT MAX("cuts_made") FROM "summary" WHERE "wins">1; |
## Task
Generate a SQL query to answer the following question:
`Tell me the highest cuts made with wins more than 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the highest cuts made with wins more than 1`:
```sql
|
SELECT MAX("wins") FROM "summary" WHERE "cuts_made">5; |
## Task
Generate a SQL query to answer the following question:
`I want to know the highest wins for cuts made more than 5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the highest wins for cuts made more than 5`:
```sql
|
SELECT SUM("top_5") FROM "summary" WHERE "events"<12 AND "top_25"<0; |
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of top 5 with events less than 12 and top 25 less than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of top 5 with events less than 12 and top 25 less than 0`:
```sql
|
SELECT MAX("crowd") FROM "round_17" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was the biggest crowd when South Melbourne was an away team?`
### 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 `What was the biggest crowd when South Melbourne was an away team?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Which venue hosted South Melbourne as an away team?`
### 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 `Which venue hosted South Melbourne as an away team?`:
```sql
|
SELECT "date" FROM "round_17" WHERE "home_team_score"='15.11 (101)'; |
## Task
Generate a SQL query to answer the following question:
`On what date did the home team score 15.11 (101)?`
### 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 `On what date did the home team score 15.11 (101)?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "away_team_score"='15.16 (106)'; |
## Task
Generate a SQL query to answer the following question:
`At what venue did the away team score 15.16 (106)?`
### 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 `At what venue did the away team score 15.16 (106)?`:
```sql
|
SELECT "away_team" FROM "round_17" WHERE "home_team_score"='12.21 (93)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team when the home team scored 12.21 (93)?`
### 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 `Who was the away team when the home team scored 12.21 (93)?`:
```sql
|
SELECT SUM("attendance") FROM "march" WHERE "date"='8 march 2008'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the game on 8 March 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 `How many people attended the game on 8 March 2008?`:
```sql
|
SELECT "away_team_score" FROM "round_3" WHERE "home_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the Away team score when they played Geelong as the Home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Away team score when they played Geelong as the Home team?`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "away_team_score"='8.14 (62)'; |
## Task
Generate a SQL query to answer the following question:
`What did the Home team score when the Away team scored 8.14 (62)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the Home team score when the Away team scored 8.14 (62)?`:
```sql
|
SELECT "away_team" FROM "round_3" WHERE "home_team_score"='7.8 (50)'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Away team when the Home team scored 7.8 (50)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Away team when the Home team scored 7.8 (50)?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "away_team_score"='4.8 (32)'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Home team when the Away team scored 4.8 (32)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Home team when the Away team scored 4.8 (32)?`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What did Carlton score when they were the Home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did Carlton score when they were the Home team?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the Home team that played Fitzroy as the Away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the Home team that played Fitzroy as the Away team?`:
```sql
|
SELECT SUM("points") FROM "ippt_standards" WHERE "grade"='a'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of points when the grade was A?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ippt_standards" (
"grade" text,
"points" real,
"sit_up_reps" text,
"standing_broad_jump_cm" text,
"chin_up_reps" text,
"shuttle_run_sec" text,
"2_4km_run_min_sec" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of points when the grade was A?`:
```sql
|
SELECT "standing_broad_jump_cm" FROM "ippt_standards" WHERE "grade"='b'; |
## Task
Generate a SQL query to answer the following question:
`Which standing broad jump (cm) had the b grade?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ippt_standards" (
"grade" text,
"points" real,
"sit_up_reps" text,
"standing_broad_jump_cm" text,
"chin_up_reps" text,
"shuttle_run_sec" text,
"2_4km_run_min_sec" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which standing broad jump (cm) had the b grade?`:
```sql
|
SELECT "grade" FROM "ippt_standards" WHERE "chin_up_reps"='9-10'; |
## Task
Generate a SQL query to answer the following question:
`Which grade did the chin-up (reps) 9-10 receive?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ippt_standards" (
"grade" text,
"points" real,
"sit_up_reps" text,
"standing_broad_jump_cm" text,
"chin_up_reps" text,
"shuttle_run_sec" text,
"2_4km_run_min_sec" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which grade did the chin-up (reps) 9-10 receive?`:
```sql
|
SELECT "year" FROM "playoff_stats" WHERE "comp"='33'; |
## Task
Generate a SQL query to answer the following question:
`What year was the comp 33?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoff_stats" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the comp 33?`:
```sql
|
SELECT "r_avg" FROM "playoff_stats" WHERE "year"='1984'; |
## Task
Generate a SQL query to answer the following question:
`In 1984, what was the RAvg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoff_stats" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 1984, what was the RAvg?`:
```sql
|
SELECT "r_att" FROM "playoff_stats" WHERE "year"='1983'; |
## Task
Generate a SQL query to answer the following question:
`In 1983, what was the RAtt?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoff_stats" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 1983, what was the RAtt?`:
```sql
|
SELECT "team" FROM "playoff_stats" WHERE "rate"='94.1'; |
## Task
Generate a SQL query to answer the following question:
`What team has a 94.1 rating?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoff_stats" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team has a 94.1 rating?`:
```sql
|
SELECT "year" FROM "playoff_stats" WHERE "r_att"='1' AND "comp"='49'; |
## Task
Generate a SQL query to answer the following question:
`What year has a RAtt of 1 and a comp of 49?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoff_stats" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year has a RAtt of 1 and a comp of 49?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "date"='august 7'; |
## Task
Generate a SQL query to answer the following question:
`Who recorded the loss on august 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who recorded the loss on august 7?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`When the away team was st kilda, what did the home team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 was st kilda, what did the home team score?`:
```sql
|
SELECT "venue" FROM "round_10" WHERE "away_team_score"='11.15 (81)'; |
## Task
Generate a SQL query to answer the following question:
`Where did the away team score 11.15 (81)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 `Where did the away team score 11.15 (81)?`:
```sql
|
SELECT "away_team_score" FROM "round_10" WHERE "home_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`When the home team was geelong, what did the away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 was geelong, what did the away team score?`:
```sql
|
SELECT "artist" FROM "500_dollars" WHERE "issue_price"='$8,159.95'; |
## Task
Generate a SQL query to answer the following question:
`Which Artist has an Issue Price of $8,159.95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "500_dollars" (
"year" real,
"artist" text,
"composition" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Artist has an Issue Price of $8,159.95?`:
```sql
|
SELECT MIN("mintage") FROM "500_dollars" WHERE "artist"='royal canadian mint engravers' AND "issue_price"='$10,199.95' AND "year">2009; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Mintage for the Artist Royal Canadian Mint Engravers, in the Year 2009, with an Issue Price of $10,199.95?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "500_dollars" (
"year" real,
"artist" text,
"composition" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest Mintage for the Artist Royal Canadian Mint Engravers, in the Year 2009, with an Issue Price of $10,199.95?`:
```sql
|
SELECT SUM("mintage") FROM "500_dollars" WHERE "artist"='steve hepburn'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Artist Steve Hepburn's Mintage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "500_dollars" (
"year" real,
"artist" text,
"composition" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of Artist Steve Hepburn's Mintage?`:
```sql
|
SELECT AVG("year") FROM "500_dollars" WHERE "artist"='royal canadian mint engravers' AND "mintage"<200; |
## Task
Generate a SQL query to answer the following question:
`What is the average Year for the Royal Canadian Mint Engravers Artist when the Mintage is under 200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "500_dollars" (
"year" real,
"artist" text,
"composition" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Year for the Royal Canadian Mint Engravers Artist when the Mintage is under 200?`:
```sql
|
SELECT MAX("mintage") FROM "500_dollars" WHERE "artist"='royal canadian mint engravers' AND "year">2008; |
## Task
Generate a SQL query to answer the following question:
`When the Year is over 2008, what is the highest Mintage for the Royal Canadian Mint Engravers Artist?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "500_dollars" (
"year" real,
"artist" text,
"composition" text,
"mintage" real,
"issue_price" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Year is over 2008, what is the highest Mintage for the Royal Canadian Mint Engravers Artist?`:
```sql
|
SELECT "name" FROM "list_of_coaches_by_club" WHERE "nationality"='united states' AND "from">2010 AND "club"='new york red bulls'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the New York Red Bulls coach who was from the United States and began after 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_coaches_by_club" (
"name" text,
"nationality" text,
"club" text,
"from" real,
"until" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the New York Red Bulls coach who was from the United States and began after 2010?`:
```sql
|
SELECT "until" FROM "list_of_coaches_by_club" WHERE "name"='josé luis sánchez solá'; |
## Task
Generate a SQL query to answer the following question:
`When did José Luis Sánchez Solá end his term of coaching?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_coaches_by_club" (
"name" text,
"nationality" text,
"club" text,
"from" real,
"until" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did José Luis Sánchez Solá end his term of coaching?`:
```sql
|
SELECT "class" FROM "1912_1922" WHERE "manufacturer"='eastleigh works' AND "year_made"='1914' AND "year_s_withdrawn"='1959'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the locomotive with an Eastleigh Works manufacturer, made in 1914, and withdrawn in 1959?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1912_1922" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text,
"year_s_withdrawn" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the locomotive with an Eastleigh Works manufacturer, made in 1914, and withdrawn in 1959?`:
```sql
|
SELECT "class" FROM "1912_1922" WHERE "wheel_arrangement"='4-6-0' AND "quantity_made"='14'; |
## Task
Generate a SQL query to answer the following question:
`What is the class of the locomotive with a wheel arrangement of 4-6-0 and a quantity made of 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1912_1922" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text,
"year_s_withdrawn" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the class of the locomotive with a wheel arrangement of 4-6-0 and a quantity made of 14?`:
```sql
|
SELECT "fleet_number_s" FROM "1912_1922" WHERE "quantity_made"='1'; |
## Task
Generate a SQL query to answer the following question:
`What is the fleet number of the locomotive with 1 quantity made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1912_1922" (
"class" text,
"wheel_arrangement" text,
"fleet_number_s" text,
"manufacturer" text,
"year_made" text,
"quantity_made" text,
"quantity_preserved" text,
"year_s_withdrawn" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fleet number of the locomotive with 1 quantity made?`:
```sql
|
SELECT MIN("crowd") FROM "round_10" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`In games where st kilda was the away team, what was the smallest crowd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 `In games where st kilda was the away team, what was the smallest crowd?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`In fitzroy's match where they were the home team, how much did they score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 `In fitzroy's match where they were the home team, how much did they score?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the home team who plays their matches at the mcg venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"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 score for the home team who plays their matches at the mcg venue?`:
```sql
|
SELECT MIN("earnings") FROM "leaders" WHERE "wins"=4 AND "rank">4; |
## Task
Generate a SQL query to answer the following question:
`Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?`:
```sql
|
SELECT SUM("wins") FROM "leaders" WHERE "earnings">'720,134'; |
## Task
Generate a SQL query to answer the following question:
`How many wins do the players that earned more than 720,134 have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many wins do the players that earned more than 720,134 have?`:
```sql
|
SELECT MAX("rank") FROM "leaders" WHERE "earnings"<'395,386'; |
## Task
Generate a SQL query to answer the following question:
`Who is the highest ranked player that has earnings below 395,386?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the highest ranked player that has earnings below 395,386?`:
```sql
|
SELECT "player" FROM "leaders" WHERE "earnings">'358,770' AND "rank"<2; |
## Task
Generate a SQL query to answer the following question:
`What player has earnings above 358,770 and a rank smaller than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `What player has earnings above 358,770 and a rank smaller than 2?`:
```sql
|
SELECT "game" FROM "schedule" WHERE "rams_points"=0; |
## Task
Generate a SQL query to answer the following question:
`In what Game did Rams Points equal 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"game" text,
"date" text,
"opponent" text,
"result" text,
"rams_points" real,
"opponents" real,
"record" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what Game did Rams Points equal 0?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "record"='6-0'; |
## Task
Generate a SQL query to answer the following question:
`What Opponent has a 6-0 Record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"game" text,
"date" text,
"opponent" text,
"result" text,
"rams_points" real,
"opponents" real,
"record" text,
"venue" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Opponent has a 6-0 Record?`:
```sql
|
SELECT SUM("interview") FROM "preliminary_competition" WHERE "average"<8.697 AND "evening_gown"<8.73 AND "state"='north dakota' AND "swimsuit">8.41; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the interview scores from North Dakota that have averages less than 8.697, evening gown scores less than 8.73, and swimsuit scores greater than 8.41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the interview scores from North Dakota that have averages less than 8.697, evening gown scores less than 8.73, and swimsuit scores greater than 8.41?`:
```sql
|
SELECT SUM("swimsuit") FROM "preliminary_competition" WHERE "evening_gown"<8.77 AND "state"='missouri' AND "average"<8.823; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the swimsuit scores from Missouri that have evening gown scores less than 8.77 and average scores less than 8.823?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the swimsuit scores from Missouri that have evening gown scores less than 8.77 and average scores less than 8.823?`:
```sql
|
SELECT COUNT("swimsuit") FROM "preliminary_competition" WHERE "average"<8.823 AND "evening_gown"<8.69 AND "interview"=8.27; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of swimsuit scores that have average scores less than 8.823, evening gown scores less than 8.69, and interview scores equal to 8.27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of swimsuit scores that have average scores less than 8.823, evening gown scores less than 8.69, and interview scores equal to 8.27?`:
```sql
|
SELECT MIN("swimsuit") FROM "preliminary_competition" WHERE "interview"<8.56 AND "evening_gown">8.54; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest swimsuit score where the contestant scored less than 8.56 in the interview and greater than 8.54 in the evening gown?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest swimsuit score where the contestant scored less than 8.56 in the interview and greater than 8.54 in the evening gown?`:
```sql
|
SELECT SUM("evening_gown") FROM "preliminary_competition" WHERE "interview"<8.77 AND "swimsuit"=7.8 AND "average"<8.2; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the evening gown scores where the interview score is less than 8.77, the swimsuit score is equal to 7.8, and the average score is less than 8.2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the evening gown scores where the interview score is less than 8.77, the swimsuit score is equal to 7.8, and the average score is less than 8.2?`:
```sql
|
SELECT SUM("attendance") FROM "second_round_proper" WHERE "tie_no"='13'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance for the game that has a tie number of 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance for the game that has a tie number of 13?`:
```sql
|
SELECT AVG("attendance") FROM "second_round_proper" WHERE "away_team"='forest green rovers'; |
## Task
Generate a SQL query to answer the following question:
`What is the average attendance when the Forest Green Rovers is the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average attendance when the Forest Green Rovers is the away team?`:
```sql
|
SELECT SUM("grid") FROM "superbike_race_2_classification" WHERE "rider"='troy corser' AND "laps"<22; |
## Task
Generate a SQL query to answer the following question:
`What is the grid number for troy corser with under 22 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the grid number for troy corser with under 22 laps?`:
```sql
|
SELECT "rider" FROM "superbike_race_2_classification" WHERE "laps"<22 AND "grid"=2; |
## Task
Generate a SQL query to answer the following question:
`What rider went under 22 laps with grid number 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What rider went under 22 laps with grid number 2?`:
```sql
|
SELECT "country_region" FROM "franchise_index" WHERE "languages"='vietnamese'; |
## Task
Generate a SQL query to answer the following question:
`What country speaks Vietnamese?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "franchise_index" (
"country_region" text,
"languages" text,
"premiere" text,
"seasons" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `What country speaks Vietnamese?`:
```sql
|
SELECT COUNT("rank") FROM "lightweight_manx_grand_prix" WHERE "team"='250cc honda' AND "time"='1:27.57.28'; |
## Task
Generate a SQL query to answer the following question:
`What ranking did Team 250cc Honda end up in when it finished a race with a time of 1:27.57.28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lightweight_manx_grand_prix" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ranking did Team 250cc Honda end up in when it finished a race with a time of 1:27.57.28?`:
```sql
|
SELECT "constructor" FROM "race" WHERE "grid"=8; |
## Task
Generate a SQL query to answer the following question:
`Tell me the constructor for grid of 8`
### 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 `Tell me the constructor for grid of 8`:
```sql
|
SELECT COUNT("grid") FROM "race" WHERE "driver"='heinz-harald frentzen'; |
## Task
Generate a SQL query to answer the following question:
`I want the total number of Grids for heinz-harald frentzen`
### 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 `I want the total number of Grids for heinz-harald frentzen`:
```sql
|
SELECT "date" FROM "round_9" WHERE "home_team_score"='8.13 (61)'; |
## Task
Generate a SQL query to answer the following question:
`On what date did Fitzroy have a home team score of 8.13 (61)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 `On what date did Fitzroy have a home team score of 8.13 (61)?`:
```sql
|
SELECT AVG("crowd") FROM "round_9" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd for the home team of North Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_9" (
"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 average crowd for the home team of North Melbourne?`:
```sql
|
SELECT "visitor" FROM "march" WHERE "date"='12 march 2008'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team on 12 March 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 on 12 March 2008?`:
```sql
|
SELECT "home" FROM "march" WHERE "visitor"='trail blazers'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team where Trail Blazers were the visitor?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 home team where Trail Blazers were the visitor?`:
```sql
|
SELECT "home" FROM "march" WHERE "visitor"='bucks' AND "date"='11 march 2008'; |
## Task
Generate a SQL query to answer the following question:
`In the game on 11 March 2008 with a visiting team of Bucks, who was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"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 `In the game on 11 March 2008 with a visiting team of Bucks, who was the home team?`:
```sql
|
SELECT COUNT("laps") FROM "race" WHERE "driver"='robin montgomerie-charrington' AND "grid"<15; |
## Task
Generate a SQL query to answer the following question:
`How many laps for robin montgomerie-charrington, and a Grid smaller than 15?`
### 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 `How many laps for robin montgomerie-charrington, and a Grid smaller than 15?`:
```sql
|
SELECT AVG("total") FROM "medal_count" WHERE "silver"=0 AND "bronze"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the mean number of totals with no silvers and a bronze number less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"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 mean number of totals with no silvers and a bronze number less than 0?`:
```sql
|
SELECT MIN("silver") FROM "medal_count" WHERE "rank"<4 AND "bronze">9; |
## Task
Generate a SQL query to answer the following question:
`What is the least number of Silvers with a ranking of less than 4 where the bronze number was larger than 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"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 least number of Silvers with a ranking of less than 4 where the bronze number was larger than 9?`:
```sql
|
SELECT AVG("rank") FROM "medal_count" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`Which mean rank had a silver number smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which mean rank had a silver number smaller than 0?`:
```sql
|
SELECT MIN("total") FROM "medal_count" WHERE "rank"=4 AND "silver">3; |
## Task
Generate a SQL query to answer the following question:
`What is the least total number with a rank of 4 and a total silver number bigger than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"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 least total number with a rank of 4 and a total silver number bigger than 3?`:
```sql
|
SELECT "category" FROM "awards_and_nominations" WHERE "award"='2nd melon music awards'; |
## Task
Generate a SQL query to answer the following question:
`Name the category for 2nd melon music awards`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the category for 2nd melon music awards`:
```sql
|
SELECT "award" FROM "awards_and_nominations" WHERE "result"='won' AND "category"='hall of fame'; |
## Task
Generate a SQL query to answer the following question:
`Name the award won in the hall of fame`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the award won in the hall of fame`:
```sql
|
SELECT "nomination" FROM "awards_and_nominations" WHERE "year"=2011 AND "result"='won'; |
## Task
Generate a SQL query to answer the following question:
`Name the nomination in 2011 that won`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the nomination in 2011 that won`:
```sql
|
SELECT "result" FROM "awards_and_nominations" WHERE "year"=2010 AND "award"='bgm cyworld'; |
## Task
Generate a SQL query to answer the following question:
`Name the result in 2010 for bgm cyworld`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_and_nominations" (
"year" real,
"award" text,
"category" text,
"nomination" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result in 2010 for bgm cyworld`:
```sql
|
SELECT COUNT("car_num") FROM "race_results" WHERE "make"='chevrolet' AND "laps"=363; |
## Task
Generate a SQL query to answer the following question:
`What is the car # of the Chevrolet that complete 363 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_results" (
"driver" text,
"car_num" real,
"make" text,
"points" real,
"laps" real,
"winnings" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the car # of the Chevrolet that complete 363 laps?`:
```sql
|
SELECT MAX("points") FROM "race_results" WHERE "winnings"='$127,541' AND "car_num">31; |
## Task
Generate a SQL query to answer the following question:
`How many points did the driver who won $127,541 driving car #31 get?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_results" (
"driver" text,
"car_num" real,
"make" text,
"points" real,
"laps" real,
"winnings" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did the driver who won $127,541 driving car #31 get?`:
```sql
|
SELECT "english_title" FROM "filmography" WHERE "year"<1999 AND "role"='kim da-rim'; |
## Task
Generate a SQL query to answer the following question:
`What is the english title of the film before 1999 with a role of kim da-rim?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"english_title" text,
"korean_title" text,
"romanization" text,
"role" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the english title of the film before 1999 with a role of kim da-rim?`:
```sql
|
SELECT "english_title" FROM "filmography" WHERE "romanization"='lee jae-su-eui nan'; |
## Task
Generate a SQL query to answer the following question:
`What English title for the Romanization of lee jae-su-eui nan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"english_title" text,
"korean_title" text,
"romanization" text,
"role" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What English title for the Romanization of lee jae-su-eui nan?`:
```sql
|
SELECT "romanization" FROM "filmography" WHERE "english_title"='my old sweetheart'; |
## Task
Generate a SQL query to answer the following question:
`What is the Romanization for my old sweetheart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"english_title" text,
"korean_title" text,
"romanization" text,
"role" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Romanization for my old sweetheart?`:
```sql
|
SELECT "english_title" FROM "filmography" WHERE "role"='chae soo-yeon'; |
## Task
Generate a SQL query to answer the following question:
`What is the English of chae soo-yeon?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "filmography" (
"year" real,
"english_title" text,
"korean_title" text,
"romanization" text,
"role" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the English of chae soo-yeon?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.