output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "result" FROM "international_goals" WHERE "competition"='1998 fifa world cup qualification' AND "venue"='bangkok'; |
## Task
Generate a SQL query to answer the following question:
`What's the Result of the Competition of 1998 FIFA World Cup Qualification with the Venue of Bangkok?`
### 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's the Result of the Competition of 1998 FIFA World Cup Qualification with the Venue of Bangkok?`:
```sql
|
SELECT "decision" FROM "february" WHERE "home"='boston'; |
## Task
Generate a SQL query to answer the following question:
`Who had the decision with boston at home?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the decision with boston at home?`:
```sql
|
SELECT "home_team" FROM "round_10" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`Who is the home team that played at MCG?`
### 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 `Who is the home team that played at MCG?`:
```sql
|
SELECT "away_team_score" FROM "round_10" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of the away team that played richmond?`
### 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 is the score of the away team that played richmond?`:
```sql
|
SELECT "score" FROM "doubles_6_3_3" WHERE "opponents"='colin fleming scott lipsky'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for the game that Colin Fleming Scott Lipsky played in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6_3_3" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for the game that Colin Fleming Scott Lipsky played in?`:
```sql
|
SELECT "tournament" FROM "doubles_6_3_3" WHERE "partner"='dieter kindlmann'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament was Dieter Kindlmann a partner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_6_3_3" (
"outcome" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which tournament was Dieter Kindlmann a partner?`:
```sql
|
SELECT MIN("goals") FROM "career_stats" WHERE "apps"<22; |
## Task
Generate a SQL query to answer the following question:
`When the Apps were smaller than 22, what's the lowest amount of goals scored in a game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_stats" (
"season" text,
"club" text,
"apps" real,
"goals" real,
"division" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the Apps were smaller than 22, what's the lowest amount of goals scored in a game?`:
```sql
|
SELECT COUNT("division") FROM "career_stats" WHERE "season"='2006/07' AND "goals">1; |
## Task
Generate a SQL query to answer the following question:
`What's the total number of all divisions during the 2006/07 season where they scored more than 1 goal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "career_stats" (
"season" text,
"club" text,
"apps" real,
"goals" real,
"division" real
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total number of all divisions during the 2006/07 season where they scored more than 1 goal?`:
```sql
|
SELECT SUM("crowd") FROM "round_16" WHERE "away_team_score"='8.17 (65)'; |
## Task
Generate a SQL query to answer the following question:
`What is the total of a crowd with an Away team score of 8.17 (65)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 total of a crowd with an Away team score of 8.17 (65)?`:
```sql
|
SELECT AVG("crowd") FROM "round_16" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd at victoria park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 at victoria park?`:
```sql
|
SELECT "away_team_score" FROM "round_16" WHERE "crowd">'10,000' AND "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What is the Away team score with a crowd greater than 10,000 and st kilda as home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 Away team score with a crowd greater than 10,000 and st kilda as home team?`:
```sql
|
SELECT "away_team_score" FROM "round_16" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the Away team score with north melbourne as home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"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 Away team score with north melbourne as home team?`:
```sql
|
SELECT "general_classification" FROM "classification_leadership" WHERE "trofeo_fast_team"='mapei-bricobi' AND "points_classification"='mariano piccoli' AND "mountains_classification"='marco pantani' AND "stage"='22'; |
## Task
Generate a SQL query to answer the following question:
`Who had the general classification when the trofeo fast team was Mapei-Bricobi, the points classification went to Mariano Piccoli and the mountains classification went to Marco Pantani in stage 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the general classification when the trofeo fast team was Mapei-Bricobi, the points classification went to Mariano Piccoli and the mountains classification went to Marco Pantani in stage 22?`:
```sql
|
SELECT "winner" FROM "classification_leadership" WHERE "stage"='3'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner in stage 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification_leadership" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner in stage 3?`:
```sql
|
SELECT "state" FROM "notes" WHERE "first_elected"='1914' AND "member"='edward jolley'; |
## Task
Generate a SQL query to answer the following question:
`Which state was first elected in 1914, and a Member of edward jolley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which state was first elected in 1914, and a Member of edward jolley?`:
```sql
|
SELECT "state" FROM "notes" WHERE "member"='frederick bamford'; |
## Task
Generate a SQL query to answer the following question:
`Which state is frederick bamford a member of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which state is frederick bamford a member of?`:
```sql
|
SELECT "first_elected" FROM "notes" WHERE "party"='labor' AND "member"='james sharpe'; |
## Task
Generate a SQL query to answer the following question:
`Which first election for the labor party is James Sharpe a part of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which first election for the labor party is James Sharpe a part of?`:
```sql
|
SELECT "party" FROM "notes" WHERE "member"='sydney sampson'; |
## Task
Generate a SQL query to answer the following question:
`Which party is sydney sampson a member of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notes" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which party is sydney sampson a member of?`:
```sql
|
SELECT "position" FROM "winners" WHERE "win_num"=2 AND "winner"='doug gibson'; |
## Task
Generate a SQL query to answer the following question:
`What position for doug gibson with 2 wins?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"season" text,
"winner" text,
"team" text,
"position" text,
"win_num" real
);
### SQL
Given the database schema, here is the SQL query that answers `What position for doug gibson with 2 wins?`:
```sql
|
SELECT COUNT("rec") FROM "wide_receivers" WHERE "player"='chris watton' AND "yards"<1; |
## Task
Generate a SQL query to answer the following question:
`How many receptions does Chris Watton with yards of less than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "wide_receivers" (
"player" text,
"rec" real,
"yards" real,
"avg" real,
"td_s" real,
"long" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many receptions does Chris Watton with yards of less than 1?`:
```sql
|
SELECT "score" FROM "february" WHERE "attendance">'19,227' AND "visitor"='ny islanders'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for plays with more than 19,227 attendees with ny islanders visiting?`
### 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,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score for plays with more than 19,227 attendees with ny islanders visiting?`:
```sql
|
SELECT "the_american" FROM "ncaa_division_i_fbs_football_win_loss_re" WHERE "years"<114 AND "tied">1 AND "total_games">1022; |
## Task
Generate a SQL query to answer the following question:
`What is the American locations with less than 114 years and more than 1 tied with more than 1022 total games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ncaa_division_i_fbs_football_win_loss_re" (
"the_american" text,
"lost" real,
"tied" real,
"pct" real,
"years" real,
"total_games" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the American locations with less than 114 years and more than 1 tied with more than 1022 total games?`:
```sql
|
SELECT MAX("crowd") FROM "round_4" WHERE "away_team_score"='14.20 (104)'; |
## Task
Generate a SQL query to answer the following question:
`What was the largest crowd for a game where the away team scored 14.20 (104)?`
### 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 was the largest crowd for a game where the away team scored 14.20 (104)?`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "home_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team when Melbourne was the home team?`
### 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 was the away team when Melbourne was the home team?`:
```sql
|
SELECT "away_team_score" FROM "round_1" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the Away team score for Away team North Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Away team score for Away team North Melbourne?`:
```sql
|
SELECT "away_team" FROM "round_1" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`Which Away team is associated with the Richmond Home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Away team is associated with the Richmond Home team?`:
```sql
|
SELECT "birthdate" FROM "members" WHERE "defining_characteristics"='pink hair'; |
## Task
Generate a SQL query to answer the following question:
`What is the birth date of the member with the Defining characteristic of pink hair?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"name" text,
"real_name" text,
"birthdate" text,
"costume_role" text,
"defining_characteristics" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the birth date of the member with the Defining characteristic of pink hair?`:
```sql
|
SELECT "defining_characteristics" FROM "members" WHERE "real_name"='takeshi kuroiwa'; |
## Task
Generate a SQL query to answer the following question:
`What is the defining characteristic of Takeshi Kuroiwa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"name" text,
"real_name" text,
"birthdate" text,
"costume_role" text,
"defining_characteristics" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the defining characteristic of Takeshi Kuroiwa?`:
```sql
|
SELECT "real_name" FROM "members" WHERE "defining_characteristics"='shortest band member'; |
## Task
Generate a SQL query to answer the following question:
`Who is the person with the defining characteristic of the shortest band member?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"name" text,
"real_name" text,
"birthdate" text,
"costume_role" text,
"defining_characteristics" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the person with the defining characteristic of the shortest band member?`:
```sql
|
SELECT "name" FROM "members" WHERE "costume_role"='monster'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the member with a costume Role of monster?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"name" text,
"real_name" text,
"birthdate" text,
"costume_role" text,
"defining_characteristics" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the member with a costume Role of monster?`:
```sql
|
SELECT "real_name" FROM "members" WHERE "costume_role"='\"the girl\"'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the member with the costume Role of "the girl"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members" (
"name" text,
"real_name" text,
"birthdate" text,
"costume_role" text,
"defining_characteristics" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the member with the costume Role of "the girl"?`:
```sql
|
SELECT "result" FROM "matches" WHERE "venue"='h' AND "opponent"='newcastle united'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score for the match played in Venue H and the opponent was Newcastle United?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "matches" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score for the match played in Venue H and the opponent was Newcastle United?`:
```sql
|
SELECT MIN("bronze") FROM "medal_table" WHERE "silver"<1 AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest bronze medals for a team with fewer than 1 silver and rank lower than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the fewest bronze medals for a team with fewer than 1 silver and rank lower than 5?`:
```sql
|
SELECT COUNT("bronze") FROM "medal_table" WHERE "gold"<3 AND "silver"=1 AND "total"<3 AND "rank"=3; |
## Task
Generate a SQL query to answer the following question:
`How many bronze medals for the nation with fewer than 3 gold, 1 silver and rank of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many bronze medals for the nation with fewer than 3 gold, 1 silver and rank of 3?`:
```sql
|
SELECT MAX("total") FROM "medal_table" WHERE "bronze"=1 AND "silver">1; |
## Task
Generate a SQL query to answer the following question:
`What is the largest total for a nation with 1 bronze and more than 1 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest total for a nation with 1 bronze and more than 1 silver?`:
```sql
|
SELECT MIN("total") FROM "medal_table" WHERE "silver">1; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest total for a nation with more than 1 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest total for a nation with more than 1 silver?`:
```sql
|
SELECT "agg" FROM "first_round" WHERE "team_num2"='okk beograd'; |
## Task
Generate a SQL query to answer the following question:
`What was the aggregate for a team #2 of Okk Beograd?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the aggregate for a team #2 of Okk Beograd?`:
```sql
|
SELECT "2nd_leg" FROM "first_round" WHERE "team_num1"='chemie halle'; |
## Task
Generate a SQL query to answer the following question:
`What was the 2nd leg score for Chemie Halle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the 2nd leg score for Chemie Halle?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What was South Melbourne's score as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was South Melbourne's score as the away team?`:
```sql
|
SELECT COUNT("crowd") FROM "round_6" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance when Geelong played as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance when Geelong played as the away team?`:
```sql
|
SELECT "venue" FROM "round_7" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`Where did Footscray play as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Footscray play as the away team?`:
```sql
|
SELECT "crowd" FROM "round_7" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance when the Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_7" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance when the Arden Street Oval?`:
```sql
|
SELECT AVG("pick") FROM "players_selected" WHERE "player"='marc lewis (lhp)' AND "round"<20; |
## Task
Generate a SQL query to answer the following question:
`What is the mean pick when the play is Marc Lewis (lhp) and the round is less than 20?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_selected" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the mean pick when the play is Marc Lewis (lhp) and the round is less than 20?`:
```sql
|
SELECT "pick" FROM "players_selected" WHERE "player"='marc lewis (lhp)'; |
## Task
Generate a SQL query to answer the following question:
`Which pick's player was Marc Lewis (lhp)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_selected" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which pick's player was Marc Lewis (lhp)?`:
```sql
|
SELECT MAX("pick") FROM "players_selected" WHERE "school"='naperville central high school'; |
## Task
Generate a SQL query to answer the following question:
`Which is the biggest pick for Naperville Central High School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "players_selected" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"school" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the biggest pick for Naperville Central High School?`:
```sql
|
SELECT "media_market_ranking" FROM "major_league_soccer" WHERE "metropolitan_area"='new york, new york'; |
## Task
Generate a SQL query to answer the following question:
`What is the media market ranking for new york, new york?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "major_league_soccer" (
"metropolitan_area" text,
"media_market_ranking" real,
"since" real,
"mlb_team_s" text,
"nba_team_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the media market ranking for new york, new york?`:
```sql
|
SELECT "home_away" FROM "schedule" WHERE "opponent"='pride' AND "result"='w 11-10'; |
## Task
Generate a SQL query to answer the following question:
`Is it home or away when opponent is Pride with a W 11-10 result?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Is it home or away when opponent is Pride with a W 11-10 result?`:
```sql
|
SELECT "opponent" FROM "schedule" WHERE "field"='bishop kearney field'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent at Bishop Kearney Field?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the opponent at Bishop Kearney Field?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "home_away"='home' AND "opponent"='bayhawks'; |
## Task
Generate a SQL query to answer the following question:
`On what date were the opponents the Bayhawks at a home game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"date" text,
"opponent" text,
"home_away" text,
"field" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date were the opponents the Bayhawks at a home game?`:
```sql
|
SELECT "raion_district_or_city" FROM "ethnic_composition_of_budjak_according_t" WHERE "bessarabian_bulgarians"='8,600'; |
## Task
Generate a SQL query to answer the following question:
`What city or Raion (district) has 8,600 Bessarabian Bulgarians?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ethnic_composition_of_budjak_according_t" (
"raion_district_or_city" text,
"total" text,
"ukrainians" text,
"moldovans" text,
"bessarabian_bulgarians" text,
"russians" text,
"gagauzians" text,
"other_ethnic_groups" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city or Raion (district) has 8,600 Bessarabian Bulgarians?`:
```sql
|
SELECT "moldovans" FROM "ethnic_composition_of_budjak_according_t" WHERE "ukrainians"='14,200'; |
## Task
Generate a SQL query to answer the following question:
`what is the Moldovans number when there are 14,200 Ukrainians?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ethnic_composition_of_budjak_according_t" (
"raion_district_or_city" text,
"total" text,
"ukrainians" text,
"moldovans" text,
"bessarabian_bulgarians" text,
"russians" text,
"gagauzians" text,
"other_ethnic_groups" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the Moldovans number when there are 14,200 Ukrainians?`:
```sql
|
SELECT MIN("reported_isn") FROM "2007_list" WHERE "citizenship"='russia'; |
## Task
Generate a SQL query to answer the following question:
`Name the lowest reported isn for russia`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_list" (
"reported_isn" real,
"on_july_2007_press_release" text,
"disposition" text,
"citizenship" text,
"country_of_act" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the lowest reported isn for russia`:
```sql
|
SELECT AVG("reported_isn") FROM "2007_list" WHERE "on_july_2007_press_release"='no' AND "citizenship"='kuwait'; |
## Task
Generate a SQL query to answer the following question:
`Name the average reported isn for july 2007 for kuwait release of no`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2007_list" (
"reported_isn" real,
"on_july_2007_press_release" text,
"disposition" text,
"citizenship" text,
"country_of_act" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the average reported isn for july 2007 for kuwait release of no`:
```sql
|
SELECT MAX("region") FROM "list_of_municipalities_in_quebec" WHERE "population"=499; |
## Task
Generate a SQL query to answer the following question:
`What is the highest region number with a 499 population?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_municipalities_in_quebec" (
"code" real,
"type" text,
"name" text,
"area_km_2" real,
"population" real,
"regional_county_municipality" text,
"region" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest region number with a 499 population?`:
```sql
|
SELECT "series" FROM "playoffs" WHERE "home"='minnesota' AND "date"='april 17'; |
## Task
Generate a SQL query to answer the following question:
`What was the series score on april 17 with minnesota at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the series score on april 17 with minnesota at home?`:
```sql
|
SELECT COUNT("attendance") FROM "playoffs" WHERE "date"='april 14'; |
## Task
Generate a SQL query to answer the following question:
`How many attended the game on april 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many attended the game on april 14?`:
```sql
|
SELECT "home" FROM "playoffs" WHERE "date"='april 14'; |
## Task
Generate a SQL query to answer the following question:
`Who was at home on april 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "playoffs" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was at home on april 14?`:
```sql
|
SELECT AVG("crowd") FROM "round_18" WHERE "home_team_score"='10.8 (68)'; |
## Task
Generate a SQL query to answer the following question:
`What is the size of the crowd at the game where the home team scored 10.8 (68)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the size of the crowd at the game where the home team scored 10.8 (68)?`:
```sql
|
SELECT "away_team" FROM "round_18" WHERE "home_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the away team that played Melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the away team that played Melbourne?`:
```sql
|
SELECT "date" FROM "round_18" WHERE "venue"='punt road oval'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game played at Punt Road Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game played at Punt Road Oval?`:
```sql
|
SELECT "home_team" FROM "round_18" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the home team that played against Hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the home team that played against Hawthorn?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "venue"='kardinia park'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score that played at Kardinia Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_18" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team score that played at Kardinia Park?`:
```sql
|
SELECT COUNT("laps") FROM "race" WHERE "driver"='rubens barrichello'; |
## Task
Generate a SQL query to answer the following question:
`I want the total number of Laps for Rubens Barrichello`
### 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 Laps for Rubens Barrichello`:
```sql
|
SELECT "driver" FROM "race" WHERE "grid"<19 AND "laps">59 AND "time_retired"='+0.294'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the driver for grid less than 19 and Laps more than 59 with time/retired of +0.294`
### 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 driver for grid less than 19 and Laps more than 59 with time/retired of +0.294`:
```sql
|
SELECT "rider" FROM "lightweight_classic_race" WHERE "time"='1:45.52.84' AND "rank"=8; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the rider with a time of 1:45.52.84, and a Rank of 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lightweight_classic_race" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the rider with a time of 1:45.52.84, and a Rank of 8?`:
```sql
|
SELECT "team" FROM "lightweight_classic_race" WHERE "rank"<5 AND "time"='1:37.58.38'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lightweight_classic_race" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38?`:
```sql
|
SELECT MAX("rank") FROM "lightweight_classic_race" WHERE "rider"='peter symes'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank for Peter Symes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lightweight_classic_race" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest rank for Peter Symes?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "away_team_score"='12.14 (86)'; |
## Task
Generate a SQL query to answer the following question:
`When was a game played where the away team scored 12.14 (86)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was a game played where the away team scored 12.14 (86)?`:
```sql
|
SELECT "away_team_score" FROM "round_13" WHERE "venue"='glenferrie oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the away team at Glenferrie Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score for the away team at Glenferrie Oval?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`When was a game played where the away team is St Kilda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was a game played where the away team is St Kilda?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "away_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team score when the away team was Carlton?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team score when the away team was Carlton?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "home_team_score"='8.9 (57)'; |
## Task
Generate a SQL query to answer the following question:
`When was the game where the home team score was 8.9 (57)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game where the home team score was 8.9 (57)?`:
```sql
|
SELECT "location" FROM "future_proposed_stadiums" WHERE "capacity"='65,000' AND "opening"='2016'; |
## Task
Generate a SQL query to answer the following question:
`What place can sit 65,000 and opens 2016?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "future_proposed_stadiums" (
"stadium" text,
"team" text,
"location" text,
"capacity" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place can sit 65,000 and opens 2016?`:
```sql
|
SELECT "stadium" FROM "future_proposed_stadiums" WHERE "team"='san diego chargers'; |
## Task
Generate a SQL query to answer the following question:
`What is the stadium of the san diego chargers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "future_proposed_stadiums" (
"stadium" text,
"team" text,
"location" text,
"capacity" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the stadium of the san diego chargers?`:
```sql
|
SELECT "team" FROM "future_proposed_stadiums" WHERE "stadium"='vikings stadium'; |
## Task
Generate a SQL query to answer the following question:
`Who is the team at vikings stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "future_proposed_stadiums" (
"stadium" text,
"team" text,
"location" text,
"capacity" text,
"opening" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the team at vikings stadium?`:
```sql
|
SELECT "building" FROM "proposals_as_of_january_2013" WHERE "floors">15 AND "year"='2013'; |
## Task
Generate a SQL query to answer the following question:
`For the Year 2013 what building(s) had more than 15 Floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposals_as_of_january_2013" (
"building" text,
"height" text,
"floors" real,
"year" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the Year 2013 what building(s) had more than 15 Floors?`:
```sql
|
SELECT "building" FROM "proposals_as_of_january_2013" WHERE "year"='2013' AND "floors"<20; |
## Task
Generate a SQL query to answer the following question:
`For the Year 2013 what building(s) had less than 20 Floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "proposals_as_of_january_2013" (
"building" text,
"height" text,
"floors" real,
"year" text,
"status" text
);
### SQL
Given the database schema, here is the SQL query that answers `For the Year 2013 what building(s) had less than 20 Floors?`:
```sql
|
SELECT "venue" FROM "round_13" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What location was the game played at when Richmond was the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location was the game played at when Richmond was the away team?`:
```sql
|
SELECT "home_team" FROM "round_13" WHERE "home_team_score"='26.14 (170)'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team when the home team score was 26.14 (170)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when the home team score was 26.14 (170)?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "venue"='vfl park'; |
## Task
Generate a SQL query to answer the following question:
`What date was the game played at vfl park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date was the game played at vfl park?`:
```sql
|
SELECT SUM("crowd") FROM "round_13" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`How many people were in the crowd when the away team was north melbourne?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people were in the crowd when the away team was north melbourne?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team_score"='20.18 (138)'; |
## Task
Generate a SQL query to answer the following question:
`What team was the away team when the home team scored 20.18 (138)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the away team when the home team scored 20.18 (138)?`:
```sql
|
SELECT "home_team" FROM "round_13" WHERE "home_team_score"='26.14 (170)'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team when the home team score was 26.14 (170)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team was the home team when the home team score was 26.14 (170)?`:
```sql
|
SELECT SUM("first_time_as_hc_climb") FROM "tour_de_france" WHERE "no_of_hc_climbs">1 AND "no_of_times_visited">29 AND "most_recent">2012; |
## Task
Generate a SQL query to answer the following question:
`When was the first HC climb which, more recently than 2012, had more than 1 HC climbs, more than 29 times visited?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france" (
"height_m" text,
"no_of_times_visited" real,
"no_of_hc_climbs" real,
"first_time_as_hc_climb" real,
"most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the first HC climb which, more recently than 2012, had more than 1 HC climbs, more than 29 times visited?`:
```sql
|
SELECT "no_of_hc_climbs" FROM "tour_de_france" WHERE "no_of_times_visited"=1 AND "most_recent">1984 AND "first_time_as_hc_climb"<1994 AND "height_m"='1900'; |
## Task
Generate a SQL query to answer the following question:
`How many HC climbs had 1 visit more recently than 1984, a first HC climb before 1994, and a height of 1900?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france" (
"height_m" text,
"no_of_times_visited" real,
"no_of_hc_climbs" real,
"first_time_as_hc_climb" real,
"most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many HC climbs had 1 visit more recently than 1984, a first HC climb before 1994, and a height of 1900?`:
```sql
|
SELECT "height_m" FROM "tour_de_france" WHERE "no_of_hc_climbs">2 AND "most_recent"=2012 AND "no_of_times_visited"<48 AND "first_time_as_hc_climb"=1989; |
## Task
Generate a SQL query to answer the following question:
`What is the height with more than 2 HC climbs more recent than 2012, less than 48 times visited, and a first HC climb in 1989?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france" (
"height_m" text,
"no_of_times_visited" real,
"no_of_hc_climbs" real,
"first_time_as_hc_climb" real,
"most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the height with more than 2 HC climbs more recent than 2012, less than 48 times visited, and a first HC climb in 1989?`:
```sql
|
SELECT COUNT("most_recent") FROM "tour_de_france" WHERE "height_m"='2770' AND "first_time_as_hc_climb"<1992; |
## Task
Generate a SQL query to answer the following question:
`What was the most recent year a height of 2770 m and a HC climb before 1992 was climbed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france" (
"height_m" text,
"no_of_times_visited" real,
"no_of_hc_climbs" real,
"first_time_as_hc_climb" real,
"most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the most recent year a height of 2770 m and a HC climb before 1992 was climbed?`:
```sql
|
SELECT "first_time_as_hc_climb" FROM "tour_de_france" WHERE "no_of_times_visited">3 AND "no_of_hc_climbs"=4 AND "most_recent"<2013 AND "height_m"='1669'; |
## Task
Generate a SQL query to answer the following question:
`When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tour_de_france" (
"height_m" text,
"no_of_times_visited" real,
"no_of_hc_climbs" real,
"first_time_as_hc_climb" real,
"most_recent" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?`:
```sql
|
SELECT "builder" FROM "ships" WHERE "pennant_number"='d03'; |
## Task
Generate a SQL query to answer the following question:
`Who is the builder of Pennant d03?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ships" (
"pennant_number" text,
"ship" text,
"builder" text,
"laid_down" text,
"launched" text,
"commissioned" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the builder of Pennant d03?`:
```sql
|
SELECT COUNT("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp">906 AND "pl_gp">99; |
## Task
Generate a SQL query to answer the following question:
`How many picks had a Reg GP that was over 906, when the Pl GP was bigger than 99?`
### 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 `How many picks had a Reg GP that was over 906, when the Pl GP was bigger than 99?`:
```sql
|
SELECT MIN("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "reg_gp"<0; |
## Task
Generate a SQL query to answer the following question:
`Which is the smallest pick number that had a Reg GP of less than 0?`
### 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 is the smallest pick number that had a Reg GP of less than 0?`:
```sql
|
SELECT "home_team_score" FROM "round_8" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`Name the home team score when the away team is south melbourne`
### 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the home team score when the away team is south melbourne`:
```sql
|
SELECT "date" FROM "round_8" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for home 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for home team of collingwood`:
```sql
|
SELECT "date" FROM "round_8" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for princes park`
### 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for princes park`:
```sql
|
SELECT "date" FROM "round_8" WHERE "venue"='brunswick street oval'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for the venue of brunswick street 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,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for the venue of brunswick street oval`:
```sql
|
SELECT "crowd" FROM "round_2" WHERE "date"='26 april 1948' AND "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendence of the game on 26 April 1948 and an away team of Hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 attendence of the game on 26 April 1948 and an away team of Hawthorn?`:
```sql
|
SELECT "home_team" FROM "round_2" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`When playing at Windy Hill, what was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_2" (
"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 playing at Windy Hill, what was the home team?`:
```sql
|
SELECT "home_team_score" FROM "round_14" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`What is essendon's home team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"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 essendon's home team score?`:
```sql
|
SELECT AVG("crowd") FROM "round_14" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd when footscray is at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"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 when footscray is at home?`:
```sql
|
SELECT "crowd" FROM "round_14" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`What is the listed crowd at windy hill?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_14" (
"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 listed crowd at windy hill?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.