output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT MIN("total") FROM "multiple_medalists" WHERE "gold"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest medal total with less than 3 gold medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "multiple_medalists" (
"athlete_nation" text,
"olympics" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest medal total with less than 3 gold medals?`:
```sql
|
SELECT MIN("laps") FROM "indy_500_results" WHERE "start"='21'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest amount of laps with a start of 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest amount of laps with a start of 21?`:
```sql
|
SELECT "start" FROM "indy_500_results" WHERE "qual"='84.300'; |
## Task
Generate a SQL query to answer the following question:
`What was the start of the competitor with a qualifying time of 84.300?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the start of the competitor with a qualifying time of 84.300?`:
```sql
|
SELECT "year" FROM "indy_500_results" WHERE "laps">200; |
## Task
Generate a SQL query to answer the following question:
`In what year were there more laps than 200 in a race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what year were there more laps than 200 in a race?`:
```sql
|
SELECT "current_version" FROM "nintendo_64" WHERE "license"='gpl v2' AND "name"='project64'; |
## Task
Generate a SQL query to answer the following question:
`what is the current version of the project64 with gpl v2 license?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nintendo_64" (
"name" text,
"current_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the current version of the project64 with gpl v2 license?`:
```sql
|
SELECT "current_version" FROM "nintendo_64" WHERE "license"='gpl v2' AND "name"='mupen64plus'; |
## Task
Generate a SQL query to answer the following question:
`what is the current version of the name mupen64plus with gpl v2 license?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nintendo_64" (
"name" text,
"current_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the current version of the name mupen64plus with gpl v2 license?`:
```sql
|
SELECT "current_version" FROM "nintendo_64" WHERE "license"='gpl v3'; |
## Task
Generate a SQL query to answer the following question:
`what is the current version with license gpl v3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nintendo_64" (
"name" text,
"current_version" text,
"system" text,
"platform" text,
"license" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the current version with license gpl v3?`:
```sql
|
SELECT "leading_man" FROM "films" WHERE "year"<1932 AND "director"='archie mayo'; |
## Task
Generate a SQL query to answer the following question:
`What leading man earlier than 1932 was directed by archie mayo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What leading man earlier than 1932 was directed by archie mayo?`:
```sql
|
SELECT SUM("year") FROM "films" WHERE "role"='nan taylor, alias of nan ellis, aka mrs. andrews' AND "director"='william keighley'; |
## Task
Generate a SQL query to answer the following question:
`What year was the role nan taylor, alias of nan ellis, aka mrs. andrews and directed by William keighley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the role nan taylor, alias of nan ellis, aka mrs. andrews and directed by William keighley?`:
```sql
|
SELECT MAX("year") FROM "films" WHERE "role"='joan gordon, aka francine la rue'; |
## Task
Generate a SQL query to answer the following question:
`What is the latest year for the role of joan gordon, aka francine la rue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the latest year for the role of joan gordon, aka francine la rue?`:
```sql
|
SELECT "film" FROM "films" WHERE "leading_man"='adolphe menjou' AND "year"=1939; |
## Task
Generate a SQL query to answer the following question:
`What film has a leading man of adolphe menjou in 1939?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film has a leading man of adolphe menjou in 1939?`:
```sql
|
SELECT "film" FROM "films" WHERE "director"='william a. wellman' AND "year">1931 AND "leading_man"='george brent' AND "role"='joan gordon, aka francine la rue'; |
## Task
Generate a SQL query to answer the following question:
`What film was the director william a. wellman, later than 1931 with a leading man of george brent, and a Role of joan gordon, aka francine la rue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film was the director william a. wellman, later than 1931 with a leading man of george brent, and a Role of joan gordon, aka francine la rue?`:
```sql
|
SELECT "director" FROM "films" WHERE "year"=1935 AND "role"='shelby barret wyatt'; |
## Task
Generate a SQL query to answer the following question:
`What director directed the role of shelby barret wyatt in 1935?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "films" (
"year" real,
"film" text,
"role" text,
"leading_man" text,
"director" text
);
### SQL
Given the database schema, here is the SQL query that answers `What director directed the role of shelby barret wyatt in 1935?`:
```sql
|
SELECT "weekly_rank_num" FROM "ratings" WHERE "share"=9 AND "viewers_m"=9.42; |
## Task
Generate a SQL query to answer the following question:
`What is the weekly rank for a share of 9 and 9.42 million viewers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"air_date" text,
"timeslot_est" text,
"season" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the weekly rank for a share of 9 and 9.42 million viewers?`:
```sql
|
SELECT SUM("rating") FROM "ratings" WHERE "weekly_rank_num"='10' AND "share"<11; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of all ratings at a weekly rank of 10 and a share less than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"air_date" text,
"timeslot_est" text,
"season" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of all ratings at a weekly rank of 10 and a share less than 11?`:
```sql
|
SELECT MAX("viewers_m") FROM "ratings" WHERE "rating">9.4; |
## Task
Generate a SQL query to answer the following question:
`What is the highest number of viewers for a rating greater than 9.4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"air_date" text,
"timeslot_est" text,
"season" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest number of viewers for a rating greater than 9.4?`:
```sql
|
SELECT "18_49_rating_share" FROM "ratings" WHERE "viewers_m">8.88 AND "weekly_rank_num"='27'; |
## Task
Generate a SQL query to answer the following question:
`What is the rating/share with more than 8.88 million viewers and a weekly rant of 27?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ratings" (
"air_date" text,
"timeslot_est" text,
"season" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rating/share with more than 8.88 million viewers and a weekly rant of 27?`:
```sql
|
SELECT "athlete" FROM "bislett_games" WHERE "year"<1984 AND "event"='800 m'; |
## Task
Generate a SQL query to answer the following question:
`Which athlete performed before 1984 in an 800 m event?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bislett_games" (
"year" real,
"event" text,
"record" text,
"athlete" text,
"nationality" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which athlete performed before 1984 in an 800 m event?`:
```sql
|
SELECT "venue" FROM "round_12" WHERE "away_team_score"='6.5 (41)'; |
## Task
Generate a SQL query to answer the following question:
`What venue has the away side scoring 6.5 (41)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 venue has the away side scoring 6.5 (41)?`:
```sql
|
SELECT "crowd" FROM "round_12" WHERE "home_team_score"='5.6 (36)'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game when the home team's score is 5.6 (36)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_12" (
"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 attended the game when the home team's score is 5.6 (36)?`:
```sql
|
SELECT MIN("points") FROM "2001_squad_statistics" WHERE "tries">23 AND "player"='tevita vaikona'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of points that Tevita Vaikona scored when making more than 23 tries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of points that Tevita Vaikona scored when making more than 23 tries?`:
```sql
|
SELECT AVG("points") FROM "2001_squad_statistics" WHERE "player"='joe vagana' AND "tries"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of points scored by Joe Vagana when making fewer than 2 tries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2001_squad_statistics" (
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of points scored by Joe Vagana when making fewer than 2 tries?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "result"='win' AND "score"='3-1'; |
## Task
Generate a SQL query to answer the following question:
`What is the competition that had a win result and a score of 3-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the competition that had a win result and a score of 3-1?`:
```sql
|
SELECT "venue" FROM "international_goals" WHERE "result"='win' AND "competition"='2002 tiger cup group stage' AND "score"='0-4'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue of the match that had a win result and a score of 0-4 in the 2002 Tiger Cup Group Stage?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue of the match that had a win result and a score of 0-4 in the 2002 Tiger Cup Group Stage?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "date"='july 22, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the match on July 22, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the match on July 22, 2008?`:
```sql
|
SELECT "score" FROM "international_goals" WHERE "competition"='2002 tiger cup third/fourth place'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the 2002 Tiger Cup third/fourth place match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the 2002 Tiger Cup third/fourth place match?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "date"='october 15, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the competition on October 15, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the competition on October 15, 2008?`:
```sql
|
SELECT "player" FROM "2008_boys_team" WHERE "school"='st. benedict''s prep'; |
## Task
Generate a SQL query to answer the following question:
`What is the player that went to st. benedict's prep?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the player that went to st. benedict's prep?`:
```sql
|
SELECT "nba_draft" FROM "2008_boys_team" WHERE "college"='ohio state'; |
## Task
Generate a SQL query to answer the following question:
`What is the NBA draft for ohio state?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NBA draft for ohio state?`:
```sql
|
SELECT "school" FROM "2008_boys_team" WHERE "height"='6-6'; |
## Task
Generate a SQL query to answer the following question:
`What school did the player that is 6-6 go to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school did the player that is 6-6 go to?`:
```sql
|
SELECT "school" FROM "2008_boys_team" WHERE "player"='samardo samuels'; |
## Task
Generate a SQL query to answer the following question:
`What school did samardo samuels go to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What school did samardo samuels go to?`:
```sql
|
SELECT "final" FROM "boxing" WHERE "event"='middleweight β75 kg'; |
## Task
Generate a SQL query to answer the following question:
`What is the final for middleweight β75 kg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing" (
"athlete" text,
"event" text,
"round_of_32" text,
"round_of_16" text,
"quarterfinal" text,
"semifinal" text,
"final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the final for middleweight β75 kg?`:
```sql
|
SELECT "athlete" FROM "boxing" WHERE "semifinal"='did not advance' AND "event"='light heavyweight β81 kg'; |
## Task
Generate a SQL query to answer the following question:
`For the light heavyweight β81 kg event that did not advance to semifinal, who was the athlete?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing" (
"athlete" text,
"event" text,
"round_of_32" text,
"round_of_16" text,
"quarterfinal" text,
"semifinal" text,
"final" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the light heavyweight β81 kg event that did not advance to semifinal, who was the athlete?`:
```sql
|
SELECT "final" FROM "boxing" WHERE "athlete"='rouhollah hosseini'; |
## Task
Generate a SQL query to answer the following question:
`What was the final for rouhollah hosseini?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing" (
"athlete" text,
"event" text,
"round_of_32" text,
"round_of_16" text,
"quarterfinal" text,
"semifinal" text,
"final" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final for rouhollah hosseini?`:
```sql
|
SELECT "round_of_16" FROM "boxing" WHERE "quarterfinal"='did not advance' AND "round_of_32"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`When the round of 32 was n/a and quarterfinal was did not advance, what was the round of 16?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "boxing" (
"athlete" text,
"event" text,
"round_of_32" text,
"round_of_16" text,
"quarterfinal" text,
"semifinal" text,
"final" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the round of 32 was n/a and quarterfinal was did not advance, what was the round of 16?`:
```sql
|
SELECT "date" FROM "round_9" WHERE "crowd">'20,771' AND "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me a date that has a crowd larger than 20,771, and a Venue at Windy Hill?`
### 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 `Can you tell me a date that has a crowd larger than 20,771, and a Venue at Windy Hill?`:
```sql
|
SELECT "home_team" FROM "round_9" WHERE "home_team_score"='9.19 (73)'; |
## Task
Generate a SQL query to answer the following question:
`What Home team that has the Home team score of 9.19 (73)?`
### 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 Home team that has the Home team score of 9.19 (73)?`:
```sql
|
SELECT "home_team" FROM "round_9" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Home team that has a Venue of Windy Hill?`
### 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 `Can you tell me the Home team that has a Venue of Windy Hill?`:
```sql
|
SELECT "venue" FROM "round_9" WHERE "away_team_score"='16.9 (105)'; |
## Task
Generate a SQL query to answer the following question:
`What Venue that has the Away team score of 16.9 (105)?`
### 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 Venue that has the Away team score of 16.9 (105)?`:
```sql
|
SELECT "away_team" FROM "round_9" WHERE "away_team_score"='6.11 (47)'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Away team that has the Away team score of 6.11 (47)?`
### 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 `Can you tell me the Away team that has the Away team score of 6.11 (47)?`:
```sql
|
SELECT MIN("attendance") FROM "regular_season" WHERE "home"='pittsburgh'; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest attendance at a game when Pittsburgh was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the lowest attendance at a game when Pittsburgh was the home team?`:
```sql
|
SELECT "date" FROM "regular_season" WHERE "home"='atlanta'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game when Atlanta was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game when Atlanta was the home team?`:
```sql
|
SELECT "decision" FROM "regular_season" WHERE "home"='montreal'; |
## Task
Generate a SQL query to answer the following question:
`What was the decision of the game when Montreal was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the decision of the game when Montreal was the home team?`:
```sql
|
SELECT "date" FROM "regular_season" WHERE "decision"='niittymaki' AND "record"='30β21β5'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game with a decision of Niittymaki and when the Flyers had a record of 30β21β5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game with a decision of Niittymaki and when the Flyers had a record of 30β21β5?`:
```sql
|
SELECT "position" FROM "selections" WHERE "nationality"='united states' AND "pick"=9; |
## Task
Generate a SQL query to answer the following question:
`Which Position has a Nationality of united states, and a Pick of 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "selections" (
"round" real,
"pick" real,
"position" text,
"nationality" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Position has a Nationality of united states, and a Pick of 9?`:
```sql
|
SELECT AVG("pick") FROM "selections" WHERE "position"='pg' AND "round"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the average Pick with a Position of pg, and a Round less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "selections" (
"round" real,
"pick" real,
"position" text,
"nationality" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average Pick with a Position of pg, and a Round less than 1?`:
```sql
|
SELECT MAX("top_10") FROM "summary" WHERE "cuts_made"<12 AND "top_5"<2 AND "events"<14; |
## Task
Generate a SQL query to answer the following question:
`Which top ten, having less than 12 cuts less than 2 top five, and events smaller than 14, is the highest?`
### 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_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which top ten, having less than 12 cuts less than 2 top five, and events smaller than 14, is the highest?`:
```sql
|
SELECT AVG("top_5") FROM "summary" WHERE "cuts_made"=42; |
## Task
Generate a SQL query to answer the following question:
`What is the average for the top five having a number of 42 cuts made.`
### 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_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average for the top five having a number of 42 cuts made.`:
```sql
|
SELECT "score" FROM "eastern_conference_quarter_finals_vs_2" WHERE "visitor"='buffalo' AND "date"='april 27'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the score on april 27 with visitor of buffalo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eastern_conference_quarter_finals_vs_2" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the score on april 27 with visitor of buffalo`:
```sql
|
SELECT "venue" FROM "round_22" WHERE "home_team_score"='12.15 (87)'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game that the home team scored 12.15 (87)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_22" (
"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 was the game that the home team scored 12.15 (87)?`:
```sql
|
SELECT SUM("crowd") FROM "round_22" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended Melbourne's away game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_22" (
"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 people attended Melbourne's away game?`:
```sql
|
SELECT "home_team_score" FROM "round_22" WHERE "away_team_score"='15.17 (107)'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score when the away team scored 15.17 (107)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_22" (
"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's score when the away team scored 15.17 (107)?`:
```sql
|
SELECT "result" FROM "golden_point_results" WHERE "venue"='dairy farmers stadium' AND "score"='28-24'; |
## Task
Generate a SQL query to answer the following question:
`Who won the game at Dairy farmers stadium with a score of 28-24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_point_results" (
"opponent" text,
"result" text,
"score" text,
"date" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won the game at Dairy farmers stadium with a score of 28-24?`:
```sql
|
SELECT "result" FROM "golden_point_results" WHERE "date"='24 july 2010'; |
## Task
Generate a SQL query to answer the following question:
`Who won that game on 24 July 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_point_results" (
"opponent" text,
"result" text,
"score" text,
"date" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who won that game on 24 July 2010?`:
```sql
|
SELECT "opponent" FROM "golden_point_results" WHERE "result"='loss' AND "score"='24-28'; |
## Task
Generate a SQL query to answer the following question:
`Who loss the 24-28 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_point_results" (
"opponent" text,
"result" text,
"score" text,
"date" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who loss the 24-28 game?`:
```sql
|
SELECT "opponent" FROM "golden_point_results" WHERE "score"='18-19'; |
## Task
Generate a SQL query to answer the following question:
`Who scored 18-19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "golden_point_results" (
"opponent" text,
"result" text,
"score" text,
"date" text,
"venue" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who scored 18-19?`:
```sql
|
SELECT "rank" FROM "medal_table" WHERE "silver">1 AND "nation"='total'; |
## Task
Generate a SQL query to answer the following question:
`Which rank has more than 1 silver and a total nation?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has more than 1 silver and a total nation?`:
```sql
|
SELECT MIN("total") FROM "medal_table" WHERE "nation"='slovenia' AND "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest total from slovenia with a Gold smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest total from slovenia with a Gold smaller than 0?`:
```sql
|
SELECT "class" FROM "fleet_details" WHERE "no_built"<12 AND "operator"='southern'; |
## Task
Generate a SQL query to answer the following question:
`What class has less than 12 numbers built operated by southern?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "fleet_details" (
"class" text,
"operator" text,
"no_built" real,
"year_built" text,
"cars_per_set" real,
"unit_nos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What class has less than 12 numbers built operated by southern?`:
```sql
|
SELECT "episode" FROM "weekly" WHERE "18_49_rating_share"='2.0/5'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the episode with an 18-49 rating of 2.0/5`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly" (
"episode" text,
"air_date" text,
"timeslot" text,
"households_rating_share" text,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the episode with an 18-49 rating of 2.0/5`:
```sql
|
SELECT "episode" FROM "weekly" WHERE "viewers_m">5.63 AND "households_rating_share"='4.5/7'; |
## Task
Generate a SQL query to answer the following question:
`Name the episode for viewers bigger than 5.63 and the households rating is 4.5/7`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly" (
"episode" text,
"air_date" text,
"timeslot" text,
"households_rating_share" text,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the episode for viewers bigger than 5.63 and the households rating is 4.5/7`:
```sql
|
SELECT "18_49_rating_share" FROM "weekly" WHERE "weekly_rank_num"='30'; |
## Task
Generate a SQL query to answer the following question:
`Name the 18-49 rating for weekly rank of 30`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly" (
"episode" text,
"air_date" text,
"timeslot" text,
"households_rating_share" text,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank_num" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 18-49 rating for weekly rank of 30`:
```sql
|
SELECT "driver" FROM "race" WHERE "laps"='29'; |
## Task
Generate a SQL query to answer the following question:
`Who was the driver with 29 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" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the driver with 29 laps?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"='18'; |
## Task
Generate a SQL query to answer the following question:
`What was the retired time for someone who was on grid 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the retired time for someone who was on grid 18?`:
```sql
|
SELECT "grid" FROM "race" WHERE "driver"='jacques villeneuve'; |
## Task
Generate a SQL query to answer the following question:
`Jacques Villeneuve was on what grid?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `Jacques Villeneuve was on what grid?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"='9'; |
## Task
Generate a SQL query to answer the following question:
`What's the time for someone on grid 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the time for someone on grid 9?`:
```sql
|
SELECT "grid" FROM "race" WHERE "driver"='alex yoong'; |
## Task
Generate a SQL query to answer the following question:
`What was the grid of Alex Yoong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the grid of Alex Yoong?`:
```sql
|
SELECT "date" FROM "round_6" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game played at Lake Oval?`
### 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 date was the game played at Lake Oval?`:
```sql
|
SELECT COUNT("crowd") FROM "round_6" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`How many people came to the game at Victoria Park?`
### 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 `How many people came to the game at Victoria Park?`:
```sql
|
SELECT "opponent" FROM "game_log" WHERE "loss"='moyer (9β4)'; |
## Task
Generate a SQL query to answer the following question:
`Who lost to moyer (9β4)?`
### 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 lost to moyer (9β4)?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "record"='47β63'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended when the record was broken with 47β63?`
### 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 `How many people attended when the record was broken with 47β63?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "away_team_score"='11.13 (79)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the home team that played the away team that scored 11.13 (79)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 that played the away team that scored 11.13 (79)?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "away_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the home team that played Collingwood?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 Collingwood?`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "crowd">'12,000' AND "venue"='punt road oval'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team that played at punt road oval where the crowd was larger than 12,000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_4" (
"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 away team that played at punt road oval where the crowd was larger than 12,000?`:
```sql
|
SELECT "visitor" FROM "january" WHERE "decision"='ward' AND "record"='22β21β4'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visitor when ward recorded the decision with a record of 22β21β4?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visitor when ward recorded the decision with a record of 22β21β4?`:
```sql
|
SELECT "score" FROM "january" WHERE "record"='22β19β4'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the game when they had a record of 22β19β4?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of the game when they had a record of 22β19β4?`:
```sql
|
SELECT SUM("1st_week_sales") FROM "highest_first_week_sales" WHERE "album"='finding forever' AND "number"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the 1st week sales for the album finding forever before the number 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_first_week_sales" (
"number" real,
"artist" text,
"album" text,
"1st_week_sales" real,
"1st_week_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the 1st week sales for the album finding forever before the number 6?`:
```sql
|
SELECT "album" FROM "highest_first_week_sales" WHERE "1st_week_position"='#1' AND "number"=6; |
## Task
Generate a SQL query to answer the following question:
`What is the album for the number 6 with the 1st week position of #1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_first_week_sales" (
"number" real,
"artist" text,
"album" text,
"1st_week_sales" real,
"1st_week_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the album for the number 6 with the 1st week position of #1?`:
```sql
|
SELECT COUNT("grid") FROM "classification" WHERE "time_retired"='2:41:38.4' AND "laps">40; |
## Task
Generate a SQL query to answer the following question:
`What is the sum number of grid where time/retired is 2:41:38.4 and laps were more than 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum number of grid where time/retired is 2:41:38.4 and laps were more than 40?`:
```sql
|
SELECT "constructor" FROM "classification" WHERE "laps">21 AND "driver"='john surtees'; |
## Task
Generate a SQL query to answer the following question:
`Which constructor had laps amounting to more than 21 where the driver was John Surtees?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which constructor had laps amounting to more than 21 where the driver was John Surtees?`:
```sql
|
SELECT SUM("laps") FROM "classification" WHERE "driver"='jo bonnier' AND "grid"<11; |
## Task
Generate a SQL query to answer the following question:
`How many laps did Jo Bonnier driver when the grid number was smaller than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"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 did Jo Bonnier driver when the grid number was smaller than 11?`:
```sql
|
SELECT SUM("laps") FROM "classification" WHERE "time_retired"='gearbox'; |
## Task
Generate a SQL query to answer the following question:
`How many laps were there when time/retired was gearbox?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"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 were there when time/retired was gearbox?`:
```sql
|
SELECT SUM("attendance") FROM "february" WHERE "visitor"='jazz'; |
## Task
Generate a SQL query to answer the following question:
`How many were in attendance at the game where the visiting team was the Jazz?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"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 were in attendance at the game where the visiting team was the Jazz?`:
```sql
|
SELECT "opponent" FROM "season_schedule" WHERE "attendance"='34,063'; |
## Task
Generate a SQL query to answer the following question:
`Who did the Chiefs play at the game attended by 34,063?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who did the Chiefs play at the game attended by 34,063?`:
```sql
|
SELECT "week" FROM "season_schedule" WHERE "attendance"='33,057'; |
## Task
Generate a SQL query to answer the following question:
`Which week's game was attended by 33,057 people?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which week's game was attended by 33,057 people?`:
```sql
|
SELECT "organisation" FROM "awards_achievements" WHERE "year"<2005 AND "award"='best variety show host'; |
## Task
Generate a SQL query to answer the following question:
`what is the organisation when the year is less than 2005 and the award is the best variety show host?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the organisation when the year is less than 2005 and the award is the best variety show host?`:
```sql
|
SELECT "organisation" FROM "awards_achievements" WHERE "nominated_work_title"='n/a' AND "year"=2005; |
## Task
Generate a SQL query to answer the following question:
`what is the organisation when the nominated work title is n/a in the year 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the organisation when the nominated work title is n/a in the year 2005?`:
```sql
|
SELECT MIN("year") FROM "awards_achievements" WHERE "result"='nominated' AND "nominated_work_title"='love bites'; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest year with the result is nominated for the work title is love bites?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the lowest year with the result is nominated for the work title is love bites?`:
```sql
|
SELECT "year" FROM "awards_achievements" WHERE "organisation"='star awards' AND "result"='won' AND "nominated_work_title"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`what is the year when then organisation is star awards, the result is won and the nominated work title is n/a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the year when then organisation is star awards, the result is won and the nominated work title is n/a?`:
```sql
|
SELECT MAX("year") FROM "awards_achievements" WHERE "result"='nominated' AND "nominated_work_title"='n/a'; |
## Task
Generate a SQL query to answer the following question:
`what is the latest year that has the result of nominated and the nominated work title is n/a?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the latest year that has the result of nominated and the nominated work title is n/a?`:
```sql
|
SELECT "nominated_work_title" FROM "awards_achievements" WHERE "result"='won' AND "organisation"='star awards' AND "award"='top 10 most popular female artiste' AND "year">2007; |
## Task
Generate a SQL query to answer the following question:
`what is the nominated work title when the result is won, the organisation is star awards and the award is top 10 most popular female artiste in the year 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "awards_achievements" (
"year" real,
"organisation" text,
"award" text,
"nominated_work_title" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the nominated work title when the result is won, the organisation is star awards and the award is top 10 most popular female artiste in the year 2007?`:
```sql
|
SELECT "rank" FROM "asian_games" WHERE "gold"='9' AND "silver"='9'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of the games that had 9 gold and 9 silvers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"games" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of the games that had 9 gold and 9 silvers?`:
```sql
|
SELECT "gold" FROM "asian_games" WHERE "bronze"='17' AND "total"='31'; |
## Task
Generate a SQL query to answer the following question:
`How many golds were there in a game that has 17 bronze and a total of 31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"games" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many golds were there in a game that has 17 bronze and a total of 31?`:
```sql
|
SELECT "games" FROM "asian_games" WHERE "bronze"='8' AND "gold"='4'; |
## Task
Generate a SQL query to answer the following question:
`Which game had 8 bronze and 4 gold?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "asian_games" (
"games" text,
"gold" text,
"silver" text,
"bronze" text,
"total" text,
"rank" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which game had 8 bronze and 4 gold?`:
```sql
|
SELECT "date" FROM "march" WHERE "visitor"='san jose'; |
## Task
Generate a SQL query to answer the following question:
`When did San Jose visit the St. Louis?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did San Jose visit the St. Louis?`:
```sql
|
SELECT SUM("wins") FROM "world_championship_grand_prix_wins_by_en" WHERE "latest_win"='1999 italian grand prix' AND "rank">15; |
## Task
Generate a SQL query to answer the following question:
`How many total wins with the latest win at the 1999 Italian Grand Prix at a rank of 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_grand_prix_wins_by_en" (
"rank" real,
"engine" text,
"wins" real,
"first_win" text,
"latest_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many total wins with the latest win at the 1999 Italian Grand Prix at a rank of 15?`:
```sql
|
SELECT MIN("wins") FROM "world_championship_grand_prix_wins_by_en" WHERE "rank">6 AND "first_win"='1950 british grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank 6 lowest win who's first win was at the 1950 British Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_grand_prix_wins_by_en" (
"rank" real,
"engine" text,
"wins" real,
"first_win" text,
"latest_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank 6 lowest win who's first win was at the 1950 British Grand Prix?`:
```sql
|
SELECT "wins" FROM "world_championship_grand_prix_wins_by_en" WHERE "rank">16 AND "latest_win"='1967 belgian grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank 16 wins with the latest win at the 1967 Belgian Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "world_championship_grand_prix_wins_by_en" (
"rank" real,
"engine" text,
"wins" real,
"first_win" text,
"latest_win" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank 16 wins with the latest win at the 1967 Belgian Grand Prix?`:
```sql
|
SELECT MIN("pick") FROM "nfl_draft" WHERE "position"='defensive back' AND "school"='drake'; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest pick for a defensive back at Drake?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" text,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the lowest pick for a defensive back at Drake?`:
```sql
|
SELECT MIN("pick") FROM "nfl_draft" WHERE "player"='terry jones'; |
## Task
Generate a SQL query to answer the following question:
`What's terry jones' lowest pick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "nfl_draft" (
"pick" real,
"round" text,
"player" text,
"position" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's terry jones' lowest pick?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.