output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "opponent" FROM "doubles_finals" WHERE "outcome"='winner' AND "partner"='andres molteni'; |
## Task
Generate a SQL query to answer the following question:
`In the match played with partner Andres Molteni, with the outcome of winner, who was the opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_finals" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponent" text,
"score" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the match played with partner Andres Molteni, with the outcome of winner, who was the opponent?`:
```sql
|
SELECT "player" FROM "most_caps" WHERE "span"='1998-2009'; |
## Task
Generate a SQL query to answer the following question:
`What is the player with a Span of 1998-2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the player with a Span of 1998-2009?`:
```sql
|
SELECT "draw" FROM "most_caps" WHERE "span"='1987-1999'; |
## Task
Generate a SQL query to answer the following question:
`What draw has a Span of 1987-1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What draw has a Span of 1987-1999?`:
```sql
|
SELECT "player" FROM "most_caps" WHERE "span"='1997-2009'; |
## Task
Generate a SQL query to answer the following question:
`What player has a span of 1997-2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What player has a span of 1997-2009?`:
```sql
|
SELECT "drop" FROM "most_caps" WHERE "conv"='0' AND "tries"='6'; |
## Task
Generate a SQL query to answer the following question:
`What drop has a 0 conv and Tries of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What drop has a 0 conv and Tries of 6?`:
```sql
|
SELECT "drop" FROM "most_caps" WHERE "start"='40'; |
## Task
Generate a SQL query to answer the following question:
`What drop had a start of 40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What drop had a start of 40?`:
```sql
|
SELECT "drop" FROM "most_caps" WHERE "pens"='0' AND "draw"='1' AND "tries"='8'; |
## Task
Generate a SQL query to answer the following question:
`What drop had 0 pens, 1 draw, and 8 tries?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_caps" (
"player" text,
"span" text,
"start" text,
"tries" text,
"conv" text,
"pens" text,
"drop" text,
"lost" text,
"draw" text
);
### SQL
Given the database schema, here is the SQL query that answers `What drop had 0 pens, 1 draw, and 8 tries?`:
```sql
|
SELECT SUM("round") FROM "mixed_martial_arts_record" WHERE "opponent"='yoko hattori'; |
## Task
Generate a SQL query to answer the following question:
`What round did Takayo Hashi face Yoko Hattori?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round did Takayo Hashi face Yoko Hattori?`:
```sql
|
SELECT "away_team" FROM "round_2" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team that played at Princes Park?`
### 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 away team that played at Princes Park?`:
```sql
|
SELECT "date" FROM "round_2" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What was the date when Footscray was the away 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 `What was the date when Footscray was the away team?`:
```sql
|
SELECT "home_team_score" FROM "round_2" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score in the match at Victoria Park?`
### 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 home team's score in the match at Victoria Park?`:
```sql
|
SELECT "date" FROM "round_2" WHERE "away_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`On what date was South Melbourne the away 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 `On what date was South Melbourne the away team?`:
```sql
|
SELECT "venue" FROM "round_2" WHERE "home_team_score"='12.19 (91)'; |
## Task
Generate a SQL query to answer the following question:
`At what venue did the home team score 12.19 (91)?`
### 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 `At what venue did the home team score 12.19 (91)?`:
```sql
|
SELECT "away_team" FROM "round_2" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What away team did Carlton play?`
### 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 away team did Carlton play?`:
```sql
|
SELECT SUM("bronze") FROM "medals_table" WHERE "silver">3; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of bronze when silver is greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of bronze when silver is greater than 3?`:
```sql
|
SELECT AVG("total") FROM "medals_table" WHERE "gold"=0 AND "bronze"=0 AND "silver"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the average total when gold is 0, bronze is 0, and silver is smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average total when gold is 0, bronze is 0, and silver is smaller than 1?`:
```sql
|
SELECT COUNT("attendance") FROM "game_by_game_results" WHERE "week"=8; |
## Task
Generate a SQL query to answer the following question:
`What was the total attendance in week 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_by_game_results" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"stadium" text,
"record" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total attendance in week 8?`:
```sql
|
SELECT "winner" FROM "list_of_international_matches" WHERE "date"=2007; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner in 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_international_matches" (
"date" real,
"sport" text,
"winner" text,
"score" text,
"loser" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner in 2007?`:
```sql
|
SELECT "sport" FROM "list_of_international_matches" WHERE "date"<2006 AND "loser"='france b'; |
## Task
Generate a SQL query to answer the following question:
`What sport was played before 2006 with a loser of france b?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_international_matches" (
"date" real,
"sport" text,
"winner" text,
"score" text,
"loser" text
);
### SQL
Given the database schema, here is the SQL query that answers `What sport was played before 2006 with a loser of france b?`:
```sql
|
SELECT "winner" FROM "list_of_international_matches" WHERE "loser"='russia-2'; |
## Task
Generate a SQL query to answer the following question:
`Who was the winner with the loser being russia-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_international_matches" (
"date" real,
"sport" text,
"winner" text,
"score" text,
"loser" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the winner with the loser being russia-2?`:
```sql
|
SELECT "loser" FROM "list_of_international_matches" WHERE "sport"='football' AND "winner"='england b' AND "date">1992; |
## Task
Generate a SQL query to answer the following question:
`Who was the loser playing football with england b as a winner after 1992?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_international_matches" (
"date" real,
"sport" text,
"winner" text,
"score" text,
"loser" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the loser playing football with england b as a winner after 1992?`:
```sql
|
SELECT "race_name" FROM "calendar" WHERE "sanctioning"='cart' AND "city_location"='brooklyn, michigan'; |
## Task
Generate a SQL query to answer the following question:
`What was the name of the race that occurred in Brooklyn, Michigan with a sanctioning of cart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"sanctioning" text,
"race_name" text,
"circuit" text,
"city_location" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the name of the race that occurred in Brooklyn, Michigan with a sanctioning of cart?`:
```sql
|
SELECT "city_location" FROM "calendar" WHERE "race_name"='gould rex mays classic 150'; |
## Task
Generate a SQL query to answer the following question:
`Where did the Gould Rex Mays Classic 150 occur?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"sanctioning" text,
"race_name" text,
"circuit" text,
"city_location" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the Gould Rex Mays Classic 150 occur?`:
```sql
|
SELECT "date" FROM "calendar" WHERE "circuit"='milwaukee mile' AND "sanctioning"='cart'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for the race that has a circuit of Milwaukee Mile and the sanctioning of cart?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "calendar" (
"sanctioning" text,
"race_name" text,
"circuit" text,
"city_location" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date for the race that has a circuit of Milwaukee Mile and the sanctioning of cart?`:
```sql
|
SELECT "year" FROM "albums" WHERE "uk_albums"='15'; |
## Task
Generate a SQL query to answer the following question:
`15 albums were released in the UK during which year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "albums" (
"year" text,
"us_200" text,
"uk_albums" text,
"riaa_certification" text,
"bpi_certification" text
);
### SQL
Given the database schema, here is the SQL query that answers `15 albums were released in the UK during which year?`:
```sql
|
SELECT "venue" FROM "round_13" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What is the venue where Collingwood played as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the venue where Collingwood played as the home team?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team_score"='13.11 (89)'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team for the game where the home team scored 13.11 (89)?`
### 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 `Who was the away team for the game where the home team scored 13.11 (89)?`:
```sql
|
SELECT AVG("crowd") FROM "round_13" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is the size of the crowd for the game with Footscray as the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the size of the crowd for the game with Footscray as the home team?`:
```sql
|
SELECT MAX("crowd") FROM "round_13" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest crowd for any game where Footscray is the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_13" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest crowd for any game where Footscray is the home team?`:
```sql
|
SELECT MAX("drawn") FROM "australasia_pool_a" WHERE "diff"<186 AND "points"<12 AND "played"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the maximum number of draws when the diff is smaller than 186, points are fewer than 12 and games played fewer than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australasia_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum number of draws when the diff is smaller than 186, points are fewer than 12 and games played fewer than 6?`:
```sql
|
SELECT AVG("diff") FROM "australasia_pool_a" WHERE "played">6; |
## Task
Generate a SQL query to answer the following question:
`What is the average diff when games played are more than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australasia_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average diff when games played are more than 6?`:
```sql
|
SELECT MAX("drawn") FROM "australasia_pool_a" WHERE "against"=54 AND "played">6; |
## Task
Generate a SQL query to answer the following question:
`What is the highest draws when more than 6 are played and the points against are 54?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australasia_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest draws when more than 6 are played and the points against are 54?`:
```sql
|
SELECT MAX("against") FROM "australasia_pool_a" WHERE "lost">0 AND "played"<6; |
## Task
Generate a SQL query to answer the following question:
`What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australasia_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games?`:
```sql
|
SELECT AVG("played") FROM "australasia_pool_a" WHERE "points"=12 AND "against"<52; |
## Task
Generate a SQL query to answer the following question:
`What is the number of games played for the team with 12 points and an against smaller than 52?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "australasia_pool_a" (
"club" text,
"played" real,
"lost" real,
"drawn" real,
"against" real,
"diff" real,
"points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of games played for the team with 12 points and an against smaller than 52?`:
```sql
|
SELECT "crowd" FROM "round_13" WHERE "home_team_score"='10.10 (70)'; |
## Task
Generate a SQL query to answer the following question:
`What was the crowd size when the home team scored 10.10 (70)?`
### 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 crowd size when the home team scored 10.10 (70)?`:
```sql
|
SELECT "away_team" FROM "round_13" WHERE "home_team_score"='10.10 (70)'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team when the home team scored 10.10 (70)?`
### 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 away team when the home team scored 10.10 (70)?`:
```sql
|
SELECT "away_team_score" FROM "round_13" WHERE "crowd">'16,500' AND "home_team_score"='15.15 (105)'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team's score when the crowd was larger than 16,500 and the home team scored 15.15 (105)?`
### 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 away team's score when the crowd was larger than 16,500 and the home team scored 15.15 (105)?`:
```sql
|
SELECT MIN("average_parish_size") FROM "by_jurisdiction_in_the_usa" WHERE "pct_of_adherents"='47.2%' AND "regular_attendees">'4,936'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest average parish size with 47.2% of adherents and 4,936 regular attendees?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_jurisdiction_in_the_usa" (
"adherents" real,
"regular_attendees" real,
"pct_of_adherents" text,
"monasteries" real,
"parishes" real,
"average_parish_size" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest average parish size with 47.2% of adherents and 4,936 regular attendees?`:
```sql
|
SELECT AVG("regular_attendees") FROM "by_jurisdiction_in_the_usa" WHERE "parishes"=79; |
## Task
Generate a SQL query to answer the following question:
`What is the average regular number of attendees that has 79 parishes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_jurisdiction_in_the_usa" (
"adherents" real,
"regular_attendees" real,
"pct_of_adherents" text,
"monasteries" real,
"parishes" real,
"average_parish_size" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average regular number of attendees that has 79 parishes?`:
```sql
|
SELECT MIN("monasteries") FROM "by_jurisdiction_in_the_usa" WHERE "parishes">20 AND "regular_attendees"='210,864' AND "adherents">'799,776'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of monasteries with over 20 parishes, 210,864 regular attendeeds, and over 799,776 adherents?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "by_jurisdiction_in_the_usa" (
"adherents" real,
"regular_attendees" real,
"pct_of_adherents" text,
"monasteries" real,
"parishes" real,
"average_parish_size" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of monasteries with over 20 parishes, 210,864 regular attendeeds, and over 799,776 adherents?`:
```sql
|
SELECT "name" FROM "other_grands_prix" WHERE "circuit"='lille'; |
## Task
Generate a SQL query to answer the following question:
`Which Grand Prix has the Circuit of Lille?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Grand Prix has the Circuit of Lille?`:
```sql
|
SELECT "winning_driver" FROM "other_grands_prix" WHERE "winning_constructor"='alfa romeo' AND "name"='roussillon grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Which winning driver of the Roussillon Grand Prix had an Alfa Romeo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which winning driver of the Roussillon Grand Prix had an Alfa Romeo?`:
```sql
|
SELECT "winning_constructor" FROM "other_grands_prix" WHERE "name"='roussillon grand prix'; |
## Task
Generate a SQL query to answer the following question:
`Which Constructor won the Roussillon Grand Prix?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Constructor won the Roussillon Grand Prix?`:
```sql
|
SELECT "winning_driver" FROM "other_grands_prix" WHERE "circuit"='rio de janeiro'; |
## Task
Generate a SQL query to answer the following question:
`Which Driver won the Circuit of Rio de Janeiro?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "other_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Driver won the Circuit of Rio de Janeiro?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "crowd">'13,500' AND "away_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team for the Essendon away team with attendance over 13,500?`
### 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 home team for the Essendon away team with attendance over 13,500?`:
```sql
|
SELECT "date" FROM "round_4" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What day did the VFL pay MCG?`
### 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 day did the VFL pay MCG?`:
```sql
|
SELECT "attendance" FROM "regular_season_schedule" WHERE "date"='november 4, 1973'; |
## Task
Generate a SQL query to answer the following question:
`What was November 4, 1973 attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was November 4, 1973 attendance?`:
```sql
|
SELECT "laps" FROM "race" WHERE "constructor"='renault' AND "driver"='jacques villeneuve'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of laps with a Constructor of renault, and a driver of jacques villeneuve?`
### 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 `What is the number of laps with a Constructor of renault, and a driver of jacques villeneuve?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"=3; |
## Task
Generate a SQL query to answer the following question:
`What is the time/retired for grid 3?`
### 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 `What is the time/retired for grid 3?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"=8; |
## Task
Generate a SQL query to answer the following question:
`What is the time/retired for grid 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time/retired for grid 8?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid">11 AND "laps">41 AND "driver"='nick heidfeld'; |
## Task
Generate a SQL query to answer the following question:
`What is the time/retired for a grid larger than 11, laps larger than 41, and nick heidfeld?`
### 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 `What is the time/retired for a grid larger than 11, laps larger than 41, and nick heidfeld?`:
```sql
|
SELECT "driver" FROM "race" WHERE "laps"<53 AND "grid">17 AND "time_retired"='spin'; |
## Task
Generate a SQL query to answer the following question:
`Who was the driver with less than 53 laps, Grid larger than 17, and a Time/Retired of spin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the driver with less than 53 laps, Grid larger than 17, and a Time/Retired of spin?`:
```sql
|
SELECT "driver" FROM "race_results" WHERE "winnings"='$98,860'; |
## Task
Generate a SQL query to answer the following question:
`Who has won $98,860?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_results" (
"driver" text,
"car_num" real,
"make" text,
"points" text,
"laps" real,
"winnings" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who has won $98,860?`:
```sql
|
SELECT "away_team" FROM "round_10" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What team is travelling to play Hawthorn?`
### 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 team is travelling to play Hawthorn?`:
```sql
|
SELECT MIN("crowd") FROM "round_10" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest crowd at the Victoria Park Venue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the smallest crowd at the Victoria Park Venue?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "home_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`What is the score given by the Home team Geelong?`
### 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 given by the Home team Geelong?`:
```sql
|
SELECT MAX("crowd") FROM "round_1" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the largest crowd at arden street oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the largest crowd at arden street oval?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`What is the home side's score at western oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home side's score at western oval?`:
```sql
|
SELECT "venue" FROM "first_and_second_rounds" WHERE "state"='connecticut'; |
## Task
Generate a SQL query to answer the following question:
`What venue is in the state of Connecticut?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue is in the state of Connecticut?`:
```sql
|
SELECT "venue" FROM "first_and_second_rounds" WHERE "city"='durham'; |
## Task
Generate a SQL query to answer the following question:
`What venue is in the city of Durham?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue is in the city of Durham?`:
```sql
|
SELECT "state" FROM "first_and_second_rounds" WHERE "venue"='thomas assembly center'; |
## Task
Generate a SQL query to answer the following question:
`In what state is the Thomas Assembly Center located?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what state is the Thomas Assembly Center located?`:
```sql
|
SELECT "venue" FROM "first_and_second_rounds" WHERE "state"='indiana' AND "host"='purdue university'; |
## Task
Generate a SQL query to answer the following question:
`What venue is located in Indiana and hosted at Purdue University?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue is located in Indiana and hosted at Purdue University?`:
```sql
|
SELECT "city" FROM "first_and_second_rounds" WHERE "state"='oklahoma'; |
## Task
Generate a SQL query to answer the following question:
`What city is located in Oklahoma?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `What city is located in Oklahoma?`:
```sql
|
SELECT "city" FROM "first_and_second_rounds" WHERE "venue"='united spirit arena'; |
## Task
Generate a SQL query to answer the following question:
`In what city is the United Spirit Arena located?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "first_and_second_rounds" (
"region" text,
"host" text,
"venue" text,
"city" text,
"state" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what city is the United Spirit Arena located?`:
```sql
|
SELECT "result" FROM "schedule" WHERE "date"='bye'; |
## Task
Generate a SQL query to answer the following question:
`What was the result when they had their bye week?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when they had their bye week?`:
```sql
|
SELECT "attendance" FROM "exhibition_schedule" WHERE "date"='september 7, 1953'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance of the Browns' September 7, 1953 game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance of the Browns' September 7, 1953 game?`:
```sql
|
SELECT "date" FROM "exhibition_schedule" WHERE "attendance">'36,796'; |
## Task
Generate a SQL query to answer the following question:
`When was the Browns' game that over 36,796 attended?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "exhibition_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `When was the Browns' game that over 36,796 attended?`:
```sql
|
SELECT "young_rider_classification" FROM "classification_leadership" WHERE "stage"='18'; |
## Task
Generate a SQL query to answer the following question:
`What Young rider classification has a Stage of 18?`
### 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,
"young_rider_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Young rider classification has a Stage of 18?`:
```sql
|
SELECT "winner" FROM "classification_leadership" WHERE "team_classification"='la vie claire' AND "general_classification"='greg lemond' AND "stage"='20'; |
## Task
Generate a SQL query to answer the following question:
`Who has a Team classification of la vie claire, a stage of 20, a General classification of greg lemond?`
### 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,
"young_rider_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who has a Team classification of la vie claire, a stage of 20, a General classification of greg lemond?`:
```sql
|
SELECT "general_classification" FROM "classification_leadership" WHERE "team_classification"='la vie claire' AND "stage"='12'; |
## Task
Generate a SQL query to answer the following question:
`What is the classification with a Team classification of la vie claire and a Stage of 12?`
### 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,
"young_rider_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the classification with a Team classification of la vie claire and a Stage of 12?`:
```sql
|
SELECT "general_classification" FROM "classification_leadership" WHERE "winner"='guido bontempi' AND "stage"='6'; |
## Task
Generate a SQL query to answer the following question:
`What is guido bontempi's general classification when he has a stage of 6?`
### 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,
"young_rider_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is guido bontempi's general classification when he has a stage of 6?`:
```sql
|
SELECT "team_classification" FROM "classification_leadership" WHERE "winner"='ludo peeters'; |
## Task
Generate a SQL query to answer the following question:
`What is Ludo Peeters' team classification?`
### 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,
"young_rider_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Ludo Peeters' team classification?`:
```sql
|
SELECT "date" FROM "round_11" WHERE "home_team_score"='17.14 (116)'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game where the home team scored 17.14 (116)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game where the home team scored 17.14 (116)?`:
```sql
|
SELECT "away_team" FROM "round_11" WHERE "crowd">'20,200' AND "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`Who was the away team at the game where Footscray was the home team and the crowd was larger than 20,200?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_11" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the away team at the game where Footscray was the home team and the crowd was larger than 20,200?`:
```sql
|
SELECT "date" FROM "england_career" WHERE "goals"<3 AND "result"='(w) 2-0'; |
## Task
Generate a SQL query to answer the following question:
`Which date had less than 3 goals and a result of (w) 2-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "england_career" (
"date" text,
"venue" text,
"opposition" text,
"att" real,
"result" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which date had less than 3 goals and a result of (w) 2-0?`:
```sql
|
SELECT "home_team" FROM "round_16" WHERE "home_team_score"='13.11 (89)'; |
## Task
Generate a SQL query to answer the following question:
`Which home team scored 13.11 (89)?`
### 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 `Which home team scored 13.11 (89)?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "away_team_score"='11.17 (83)'; |
## Task
Generate a SQL query to answer the following question:
`When an away team scored 11.17 (83), at which venue were they playing?`
### 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 `When an away team scored 11.17 (83), at which venue were they playing?`:
```sql
|
SELECT "date" FROM "round_16" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`On what date was a match held at MCG?`
### 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 `On what date was a match held at MCG?`:
```sql
|
SELECT AVG("crowd") FROM "round_16" WHERE "away_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`When Fitzroy are the away team, what is the average crowd size?`
### 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 `When Fitzroy are the away team, what is the average crowd size?`:
```sql
|
SELECT "away_team_score" FROM "round_8_national_day_round" WHERE "home_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is footscray's away team score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8_national_day_round" (
"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 footscray's away team score?`:
```sql
|
SELECT "record" FROM "mixed_martial_arts_record" WHERE "opponent"='jeremija sanders'; |
## Task
Generate a SQL query to answer the following question:
`What is the record of Jeremija Sanders' opponent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the record of Jeremija Sanders' opponent?`:
```sql
|
SELECT AVG("tries") FROM "most_points" WHERE "start">32 AND "player"='seremaia bai' AND "conv">47; |
## Task
Generate a SQL query to answer the following question:
`What is the average number of tries that has a start larger than 32, is a player of seremaia bai that also has a conversion score larger than 47?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_points" (
"player" text,
"span" text,
"start" real,
"tries" real,
"conv" real,
"pens" real,
"drop" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average number of tries that has a start larger than 32, is a player of seremaia bai that also has a conversion score larger than 47?`:
```sql
|
SELECT MIN("start") FROM "most_points" WHERE "player"='fero lasagavibau'; |
## Task
Generate a SQL query to answer the following question:
`For the player fero lasagavibau who has the lowest start?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_points" (
"player" text,
"span" text,
"start" real,
"tries" real,
"conv" real,
"pens" real,
"drop" real
);
### SQL
Given the database schema, here is the SQL query that answers `For the player fero lasagavibau who has the lowest start?`:
```sql
|
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='4-0'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent when Raphael was 4-0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the opponent when Raphael was 4-0?`:
```sql
|
SELECT AVG("round") FROM "mixed_martial_arts_record" WHERE "record"='3-0'; |
## Task
Generate a SQL query to answer the following question:
`What was the average round when he had a 3-0 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average round when he had a 3-0 record?`:
```sql
|
SELECT "location" FROM "mixed_martial_arts_record" WHERE "record"='2-0'; |
## Task
Generate a SQL query to answer the following question:
`What was the location when he had a 2-0 record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the location when he had a 2-0 record?`:
```sql
|
SELECT "res" FROM "mixed_martial_arts_record" WHERE "round"=1 AND "opponent"='jeremy beck'; |
## Task
Generate a SQL query to answer the following question:
`What was the result when he went 1 round against jeremy beck?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"round" real,
"time" text,
"location" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when he went 1 round against jeremy beck?`:
```sql
|
SELECT "result" FROM "round_5" WHERE "city"='halifax'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the game in halifax?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"date" text,
"result" text,
"score" text,
"stadium" text,
"city" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the game in halifax?`:
```sql
|
SELECT "stadium" FROM "round_5" WHERE "city"='halifax'; |
## Task
Generate a SQL query to answer the following question:
`What stadium is located in Halifax?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"date" text,
"result" text,
"score" text,
"stadium" text,
"city" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What stadium is located in Halifax?`:
```sql
|
SELECT "date" FROM "round_5" WHERE "city"='salford'; |
## Task
Generate a SQL query to answer the following question:
`What day did they play in salford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"date" text,
"result" text,
"score" text,
"stadium" text,
"city" text,
"crowd" real
);
### SQL
Given the database schema, here is the SQL query that answers `What day did they play in salford?`:
```sql
|
SELECT MIN("week") FROM "regular_season_schedule" WHERE "opponent"='chicago cardinals' AND "attendance"<'25,312'; |
## Task
Generate a SQL query to answer the following question:
`What was the earliest week the team played the chicago cardinals in front of less than 25,312?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the earliest week the team played the chicago cardinals in front of less than 25,312?`:
```sql
|
SELECT "date" FROM "regular_season_schedule" WHERE "week"=4; |
## Task
Generate a SQL query to answer the following question:
`What day did they play on week 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What day did they play on week 4?`:
```sql
|
SELECT "opponent" FROM "regular_season_schedule" WHERE "attendance">'55,096' AND "date"='october 20, 1963'; |
## Task
Generate a SQL query to answer the following question:
`What team did the Brows play against on October 20, 1963 to a crowd larger than 55,096?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What team did the Brows play against on October 20, 1963 to a crowd larger than 55,096?`:
```sql
|
SELECT "attendance" FROM "regular_season_schedule" WHERE "week"=1; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance during the week 1 match?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the attendance during the week 1 match?`:
```sql
|
SELECT AVG("week") FROM "regular_season_schedule" WHERE "date"='november 10, 1963'; |
## Task
Generate a SQL query to answer the following question:
`During what week was the match on November 10, 1963?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `During what week was the match on November 10, 1963?`:
```sql
|
SELECT "result" FROM "regular_season_schedule" WHERE "date"='december 1, 1963'; |
## Task
Generate a SQL query to answer the following question:
`What was the result of the match on December 1, 1963?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the match on December 1, 1963?`:
```sql
|
SELECT "date" FROM "round_3" WHERE "crowd">'23,135' AND "away_team_score"='3.8 (26)'; |
## Task
Generate a SQL query to answer the following question:
`When did a crowd larger than 23,135 watch an away team score 3.8 (26)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did a crowd larger than 23,135 watch an away team score 3.8 (26)?`:
```sql
|
SELECT "away_team_score" FROM "round_3" WHERE "home_team_score"='5.12 (42)'; |
## Task
Generate a SQL query to answer the following question:
`What was the Away team score against a home team with 5.12 (42)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Away team score against a home team with 5.12 (42)?`:
```sql
|
SELECT "date" FROM "round_3" WHERE "away_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`What day is hawthorn the away side?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What day is hawthorn the away side?`:
```sql
|
SELECT AVG("crowd") FROM "round_3" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the average crowd size for games with north melbourne as the away side?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average crowd size for games with north melbourne as the away side?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.