output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "area" FROM "hibiscus_and_bays_local_board" WHERE "decile"='8'; |
## Task
Generate a SQL query to answer the following question:
`What area is the school with a decile of 8 in?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "hibiscus_and_bays_local_board" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What area is the school with a decile of 8 in?`:
```sql
|
SELECT "name" FROM "hibiscus_and_bays_local_board" WHERE "authority"='state' AND "roll"=318; |
## Task
Generate a SQL query to answer the following question:
`Which school has a state authority and a roll of 318?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "hibiscus_and_bays_local_board" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which school has a state authority and a roll of 318?`:
```sql
|
SELECT "area" FROM "hibiscus_and_bays_local_board" WHERE "authority"='state' AND "name"='torbay school'; |
## Task
Generate a SQL query to answer the following question:
`In what area is torbay school with a state authority?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "hibiscus_and_bays_local_board" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `In what area is torbay school with a state authority?`:
```sql
|
SELECT "regular_season" FROM "baseball_titles_by_school" WHERE "tournament"<2 AND "total">0 AND "team"='kansas'; |
## Task
Generate a SQL query to answer the following question:
`How many regular season titles did Kansas receive when they received fewer than 2 tournament titles and more than 0 total titles?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "baseball_titles_by_school" (
"team" text,
"season" text,
"regular_season" real,
"tournament" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many regular season titles did Kansas receive when they received fewer than 2 tournament titles and more than 0 total titles?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "laps"<66 AND "grid"<10 AND "driver"='heinz-harald frentzen'; |
## Task
Generate a SQL query to answer the following question:
`What is the time of retirement with Laps smaller than 66, a grid less than 10, and a Driver of heinz-harald frentzen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the time of retirement with Laps smaller than 66, a grid less than 10, and a Driver of heinz-harald frentzen?`:
```sql
|
SELECT "laps" FROM "race" WHERE "driver"='olivier panis'; |
## Task
Generate a SQL query to answer the following question:
`How many laps does olivier panis have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps does olivier panis have?`:
```sql
|
SELECT "home_team" FROM "round_1" WHERE "away_team"='geelong'; |
## Task
Generate a SQL query to answer the following question:
`Which home team played against Geelong?`
### 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 home team played against Geelong?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "away_team_score"='18.20 (128)'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when the away team scored 18.20 (128)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the home team score when the away team scored 18.20 (128)?`:
```sql
|
SELECT "crowd" FROM "round_1" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`How large was the crowd when North Melbourne played as the away 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 `How large was the crowd when North Melbourne played as the away team?`:
```sql
|
SELECT "away_team" FROM "round_20" WHERE "home_team"='hawthorn'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away team that played home team Hawthorn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the away team that played home team Hawthorn?`:
```sql
|
SELECT "home_team" FROM "round_20" WHERE "away_team"='footscray'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the home team that played away team Footscray?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the home team that played away team Footscray?`:
```sql
|
SELECT "home_team" FROM "round_20" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`Who is the home team that played at venue MCG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the home team that played at venue MCG?`:
```sql
|
SELECT "first_appearance" FROM "notable_villains" WHERE "portrayed_by"='chad williams'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the first appearance when Chad Williams is a portrayal?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_villains" (
"character" text,
"portrayed_by" text,
"crime" text,
"first_appearance" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the first appearance when Chad Williams is a portrayal?`:
```sql
|
SELECT "character" FROM "notable_villains" WHERE "portrayed_by"='elias koteas'; |
## Task
Generate a SQL query to answer the following question:
`Which character is portrayed by Elias Koteas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "notable_villains" (
"character" text,
"portrayed_by" text,
"crime" text,
"first_appearance" text,
"last_appearance" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which character is portrayed by Elias Koteas?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "venue"='vfl park'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home Team Score at VFL Park?`
### 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 Home Team Score at VFL Park?`:
```sql
|
SELECT "home_team_score" FROM "round_10" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`What is the Home Team Score at Windy Hill?`
### 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 Home Team Score at Windy Hill?`:
```sql
|
SELECT "date" FROM "round_10" WHERE "away_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`On what Date is Carlton the Away Team?`
### 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 `On what Date is Carlton the Away Team?`:
```sql
|
SELECT MIN("crowd") FROM "round_10" WHERE "home_team_score"='9.13 (67)'; |
## Task
Generate a SQL query to answer the following question:
`What Crowd had the least people with a Home Team Score of 9.13 (67)?`
### 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 Crowd had the least people with a Home Team Score of 9.13 (67)?`:
```sql
|
SELECT "date" FROM "round_10" WHERE "home_team_score"='9.13 (67)'; |
## Task
Generate a SQL query to answer the following question:
`On what Date was the Home Team Score 9.13 (67)?`
### 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 `On what Date was the Home Team Score 9.13 (67)?`:
```sql
|
SELECT "competition" FROM "international_goals" WHERE "result"='3-1'; |
## Task
Generate a SQL query to answer the following question:
`Which competition with a result of 3-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition with a result of 3-1?`:
```sql
|
SELECT MIN("ligue_1_titles") FROM "members_for_2013_14" WHERE "position_in_2012_13"='010 12th' AND "number_of_seasons_in_ligue_1">56; |
## Task
Generate a SQL query to answer the following question:
`I want to know the lowest ligue 1 titles for position in 2012-13 of 010 12th and number of seasons in ligue 1 more than 56`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_for_2013_14" (
"club" text,
"position_in_2012_13" text,
"first_season_in_top_division" text,
"number_of_seasons_in_ligue_1" real,
"first_season_of_current_spell_in_top_division" text,
"ligue_1_titles" real,
"last_ligue_1_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want to know the lowest ligue 1 titles for position in 2012-13 of 010 12th and number of seasons in ligue 1 more than 56`:
```sql
|
SELECT "position_in_2012_13" FROM "members_for_2013_14" WHERE "number_of_seasons_in_ligue_1"=30 AND "ligue_1_titles"=1; |
## Task
Generate a SQL query to answer the following question:
`Tell me the position in 2012-13 and number of seasons in leigue 1 of 30 with ligue 1 titles of 1`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "members_for_2013_14" (
"club" text,
"position_in_2012_13" text,
"first_season_in_top_division" text,
"number_of_seasons_in_ligue_1" real,
"first_season_of_current_spell_in_top_division" text,
"ligue_1_titles" real,
"last_ligue_1_title" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the position in 2012-13 and number of seasons in leigue 1 of 30 with ligue 1 titles of 1`:
```sql
|
SELECT "nba_draft" FROM "1983_boys_team" WHERE "hometown"='kingston, pa'; |
## Task
Generate a SQL query to answer the following question:
`What is the NBA draft result of the player from Kingston, PA?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1983_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NBA draft result of the player from Kingston, PA?`:
```sql
|
SELECT "nba_draft" FROM "1983_boys_team" WHERE "height"='6-7'; |
## Task
Generate a SQL query to answer the following question:
`What is the NBA draft result of the player with a height of 6-7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1983_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NBA draft result of the player with a height of 6-7?`:
```sql
|
SELECT "nba_draft" FROM "1983_boys_team" WHERE "player"='dwayne washington'; |
## Task
Generate a SQL query to answer the following question:
`What is the NBA draft result of Dwayne Washington?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1983_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NBA draft result of Dwayne Washington?`:
```sql
|
SELECT "nba_draft" FROM "1983_boys_team" WHERE "school"='dunbar high school'; |
## Task
Generate a SQL query to answer the following question:
`What is the NBA draft result of the player from Dunbar High School?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1983_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the NBA draft result of the player from Dunbar High School?`:
```sql
|
SELECT "school" FROM "1983_boys_team" WHERE "college"='michigan'; |
## Task
Generate a SQL query to answer the following question:
`What is the school of the player from the College of Michigan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1983_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the school of the player from the College of Michigan?`:
```sql
|
SELECT "away_team_score" FROM "round_1" WHERE "home_team_score"='19.16 (130)'; |
## Task
Generate a SQL query to answer the following question:
`What is the away team score for the game where the home team scored 19.16 (130)?`
### 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 the game where the home team scored 19.16 (130)?`:
```sql
|
SELECT "away_team_score" FROM "round_1" WHERE "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`What was the away team score for the game played at MCG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the away team score for the game played at MCG?`:
```sql
|
SELECT "home_team_score" FROM "round_1" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score at Victoria Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team's score at Victoria Park?`:
```sql
|
SELECT "score" FROM "2002_fixtures_and_results" WHERE "venue"='shay stadium'; |
## Task
Generate a SQL query to answer the following question:
`What is the score at shay stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2002_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score at shay stadium?`:
```sql
|
SELECT "result" FROM "2002_fixtures_and_results" WHERE "venue"='valley parade' AND "date"='4/7/02'; |
## Task
Generate a SQL query to answer the following question:
`What is the result at valley parade on 4/7/02?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2002_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result at valley parade on 4/7/02?`:
```sql
|
SELECT "competition" FROM "2002_fixtures_and_results" WHERE "goals"='deacon 8/8' AND "score"='32-14'; |
## Task
Generate a SQL query to answer the following question:
`Which competition has a Goal of deacon 8/8 and a Score of 32-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2002_fixtures_and_results" (
"date" text,
"competition" text,
"venue" text,
"result" text,
"score" text,
"goals" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which competition has a Goal of deacon 8/8 and a Score of 32-14?`:
```sql
|
SELECT MAX("grid") FROM "race" WHERE "driver"='martin brundle'; |
## Task
Generate a SQL query to answer the following question:
`What is the top grid that is driven by martin brundle?`
### 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 top grid that is driven by martin brundle?`:
```sql
|
SELECT "time_retired" FROM "race" WHERE "grid"=13; |
## Task
Generate a SQL query to answer the following question:
`What is the grid 13 time score?`
### 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 grid 13 time score?`:
```sql
|
SELECT MIN("grid") FROM "race" WHERE "driver"='thierry boutsen' AND "laps"<44; |
## Task
Generate a SQL query to answer the following question:
`Which grid is lower for thierry boutsen which laps less than 44?`
### 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 `Which grid is lower for thierry boutsen which laps less than 44?`:
```sql
|
SELECT "player" FROM "2002_boys_team" WHERE "height"='6-2'; |
## Task
Generate a SQL query to answer the following question:
`Which player is 6-2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2002_boys_team" (
"player" text,
"height" text,
"school" text,
"hometown" text,
"college" text,
"nba_draft" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player is 6-2?`:
```sql
|
SELECT "laid_down" FROM "h_class" WHERE "ship"='hyperion'; |
## Task
Generate a SQL query to answer the following question:
`What is the Laid down for the Hyperion ship?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "h_class" (
"ship" text,
"pennant_number" text,
"laid_down" text,
"launched" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Laid down for the Hyperion ship?`:
```sql
|
SELECT "ship" FROM "h_class" WHERE "pennant_number"='h55'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the ship that had a Pennant number of h55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "h_class" (
"ship" text,
"pennant_number" text,
"laid_down" text,
"launched" text,
"completed" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the ship that had a Pennant number of h55?`:
```sql
|
SELECT "worldwide_gross" FROM "highest_grossing_bollywood_films_worldwi" WHERE "movie"='jab tak hai jaan'; |
## Task
Generate a SQL query to answer the following question:
`How did the jab tak hai jaan movie gross worldwide?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_bollywood_films_worldwi" (
"rank" real,
"movie" text,
"year" real,
"worldwide_gross" text,
"director" text,
"verdict" text
);
### SQL
Given the database schema, here is the SQL query that answers `How did the jab tak hai jaan movie gross worldwide?`:
```sql
|
SELECT AVG("year") FROM "highest_grossing_bollywood_films_worldwi" WHERE "director"='ayan mukerji'; |
## Task
Generate a SQL query to answer the following question:
`What is average year for ayan mukerji?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "highest_grossing_bollywood_films_worldwi" (
"rank" real,
"movie" text,
"year" real,
"worldwide_gross" text,
"director" text,
"verdict" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is average year for ayan mukerji?`:
```sql
|
SELECT "home_team_score" FROM "round_4" WHERE "home_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`When melbourne was the home team what was their score?`
### 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 `When melbourne was the home team what was their score?`:
```sql
|
SELECT "date" FROM "pool_a" WHERE "time"='20:10'; |
## Task
Generate a SQL query to answer the following question:
`What date had a time of 20:10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_a" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"set_4" text,
"total" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date had a time of 20:10?`:
```sql
|
SELECT "episode_title" FROM "season_2" WHERE "original_airdate"='march 31, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the episode that originally aired on March 31, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2" (
"production_no" real,
"episode_no" real,
"original_airdate" text,
"episode_title" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of the episode that originally aired on March 31, 2008?`:
```sql
|
SELECT "episode_no" FROM "season_2" WHERE "original_airdate"='february 4, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What is the episode number of the episode that originally aired on February 4, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_2" (
"production_no" real,
"episode_no" real,
"original_airdate" text,
"episode_title" text,
"host" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode number of the episode that originally aired on February 4, 2008?`:
```sql
|
SELECT "home_team_score" FROM "round_6" WHERE "away_team_score"='21.11 (137)'; |
## Task
Generate a SQL query to answer the following question:
`when the away team score was 21.11 (137) what was the home team score?`
### 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 `when the away team score was 21.11 (137) what was the home team score?`:
```sql
|
SELECT "away_team_score" FROM "round_6" WHERE "venue"='kardinia park'; |
## Task
Generate a SQL query to answer the following question:
`at kardinia park, what was the away team's score?`
### 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 `at kardinia park, what was the away team's score?`:
```sql
|
SELECT MAX("crowd") FROM "round_6" WHERE "venue"='kardinia park'; |
## Task
Generate a SQL query to answer the following question:
`what was the largest attendance at kardinia park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_6" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `what was the largest attendance at kardinia park?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`Who was the Home team at the Western Oval location?`
### 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 `Who was the Home team at the Western Oval location?`:
```sql
|
SELECT AVG("laps") FROM "race" WHERE "driver"='patrick tambay'; |
## Task
Generate a SQL query to answer the following question:
`What's the average of the amount of laps for the driver patrick tambay?`
### 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's the average of the amount of laps for the driver patrick tambay?`:
```sql
|
SELECT MAX("laps") FROM "race" WHERE "grid">6 AND "constructor"='renault' AND "time_retired"='ignition'; |
## Task
Generate a SQL query to answer the following question:
`When renault is the constructor, the grid is over 6, and the time was labeled ignition, what's the largest amount of laps on record?`
### 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 `When renault is the constructor, the grid is over 6, and the time was labeled ignition, what's the largest amount of laps on record?`:
```sql
|
SELECT "world_ranking_1" FROM "table" WHERE "ranking_l_a_2"='5th' AND "year_of_publication"='2008'; |
## Task
Generate a SQL query to answer the following question:
`In 2008, what was the world ranking that ranked 5th in L.A.?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table" (
"index_year" text,
"author_editor_source" text,
"year_of_publication" text,
"countries_sampled" real,
"world_ranking_1" text,
"ranking_l_a_2" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 2008, what was the world ranking that ranked 5th in L.A.?`:
```sql
|
SELECT COUNT("played") FROM "final_table" WHERE "goals_for">34 AND "goals_against">63; |
## Task
Generate a SQL query to answer the following question:
`what is the total number of played when the goals for is more than 34 and goals against is more than 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total number of played when the goals for is more than 34 and goals against is more than 63?`:
```sql
|
SELECT COUNT("goal_difference") FROM "final_table" WHERE "club"='cf extremadura' AND "played"<38; |
## Task
Generate a SQL query to answer the following question:
`what is the total number of goal different when the club is cf extremadura and the played is less than 38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total number of goal different when the club is cf extremadura and the played is less than 38?`:
```sql
|
SELECT AVG("points") FROM "final_table" WHERE "goal_difference"<17 AND "club"='getafe cf' AND "goals_for">30; |
## Task
Generate a SQL query to answer the following question:
`what is the average points when the goal difference is less than 17, the club is getafe cf and the goals for is more than 30?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average points when the goal difference is less than 17, the club is getafe cf and the goals for is more than 30?`:
```sql
|
SELECT SUM("goals_for") FROM "final_table" WHERE "position"<8 AND "losses"<10 AND "goals_against"<35 AND "played"<38; |
## Task
Generate a SQL query to answer the following question:
`what is the sum of goals for when the position is less than 8, the losses is less than 10 the goals against is less than 35 and played is less than 38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "final_table" (
"position" real,
"club" text,
"played" real,
"points" real,
"wins" real,
"draws" real,
"losses" real,
"goals_for" real,
"goals_against" real,
"goal_difference" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the sum of goals for when the position is less than 8, the losses is less than 10 the goals against is less than 35 and played is less than 38?`:
```sql
|
SELECT MAX("gold") FROM "medal_table" WHERE "rank"='12' AND "nation"='vietnam'; |
## Task
Generate a SQL query to answer the following question:
`what is the highest gold when the rank is 12 for the nation vietnam?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the highest gold when the rank is 12 for the nation vietnam?`:
```sql
|
SELECT "total" FROM "medal_table" WHERE "rank"='4'; |
## Task
Generate a SQL query to answer the following question:
`what is the total when the rank is 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total when the rank is 4?`:
```sql
|
SELECT "nation" FROM "medal_table" WHERE "gold"=1 AND "bronze">0; |
## Task
Generate a SQL query to answer the following question:
`what is the nation when the gold is 1 and bronze is larger than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the nation when the gold is 1 and bronze is larger than 0?`:
```sql
|
SELECT "entrant" FROM "drivers_and_constructors" WHERE "engine"='ferrari 038 3.5 v12'; |
## Task
Generate a SQL query to answer the following question:
`Which entrant has Ferrari 038 3.5 v12 engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which entrant has Ferrari 038 3.5 v12 engine?`:
```sql
|
SELECT "founded" FROM "current_members" WHERE "institution"='lynn university'; |
## Task
Generate a SQL query to answer the following question:
`What is the date that the Institution of Lynn University was founded on?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_members" (
"institution" text,
"location" text,
"founded" real,
"type" text,
"enrollment" real,
"nickname" text,
"joined" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the date that the Institution of Lynn University was founded on?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "score"='5-1'; |
## Task
Generate a SQL query to answer the following question:
`What's the Loss listed with a Score of 5-1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Loss listed with a Score of 5-1?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='3-5'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a record of 3-5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a record of 3-5?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='6-9'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Record of 6-9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has a Record of 6-9?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "opponent"='california angels' AND "attendance"='57,762'; |
## Task
Generate a SQL query to answer the following question:
`What's the Loss listed for the Opponent of California Angels and has an Attendance of 57,762?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Loss listed for the Opponent of California Angels and has an Attendance of 57,762?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "attendance"='9,535'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has an Attendance of 9,535?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Date has an Attendance of 9,535?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "date"='april 23'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score for the Date of April 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Score for the Date of April 23?`:
```sql
|
SELECT AVG("crowd") FROM "round_1" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What was the average crowd size at Victoria Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_1" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the average crowd size at Victoria Park?`:
```sql
|
SELECT MIN("crowd") FROM "round_1" WHERE "away_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What is the crowd size of the match featuring North Melbourne as the away 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 `What is the crowd size of the match featuring North Melbourne as the away team?`:
```sql
|
SELECT "team" FROM "game_log" WHERE "high_rebounds"='smith (10)'; |
## Task
Generate a SQL query to answer the following question:
`Name the team which has high rebounds of smith (10)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_points" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the team which has high rebounds of smith (10)`:
```sql
|
SELECT "home_team" FROM "round_18" WHERE "away_team"='melbourne'; |
## Task
Generate a SQL query to answer the following question:
`What team was the home team against 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 team was the home team against Melbourne?`:
```sql
|
SELECT "home_team_score" FROM "round_18" WHERE "away_team_score"='13.17 (95)'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team score when the away team scored 13.17 (95)?`
### 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 was the home team score when the away team scored 13.17 (95)?`:
```sql
|
SELECT "home_team" FROM "round_3" WHERE "venue"='lake oval'; |
## Task
Generate a SQL query to answer the following question:
`Which team is Lake Oval home to?`
### 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 `Which team is Lake Oval home to?`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "away_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`What did the home team score when Carlton played as the Away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_3" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What did the home team score when Carlton played as the Away team?`:
```sql
|
SELECT SUM("crowd") FROM "round_3" WHERE "home_team"='south melbourne'; |
## Task
Generate a SQL query to answer the following question:
`How many people attended the home game for South Melbourne?`
### 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 `How many people attended the home game for South Melbourne?`:
```sql
|
SELECT "home_team_score" FROM "round_3" WHERE "venue"='vfl park'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team score at VFL Park?`
### 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 home team score at VFL Park?`:
```sql
|
SELECT COUNT("grid") FROM "classification" WHERE "time_retired"='gearbox' AND "laps"<3; |
## Task
Generate a SQL query to answer the following question:
`How many grids have a Time/Retired of gearbox, and Laps smaller than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many grids have a Time/Retired of gearbox, and Laps smaller than 3?`:
```sql
|
SELECT AVG("laps") FROM "classification" WHERE "driver"='masten gregory'; |
## Task
Generate a SQL query to answer the following question:
`What is masten gregory's average lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is masten gregory's average lap?`:
```sql
|
SELECT "time_retired" FROM "classification" WHERE "grid"=2; |
## Task
Generate a SQL query to answer the following question:
`Which Time/Retired has a Grid of 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which Time/Retired has a Grid of 2?`:
```sql
|
SELECT "tyre" FROM "championship_teams_and_drivers" WHERE "rounds"='14-15' AND "engine"='ford cosworth dfv 3.0 v8' AND "chassis"='m23'; |
## Task
Generate a SQL query to answer the following question:
`When the engine Ford Cosworth DFV 3.0 v8 has a chassis of m23 and in rounds 14-15, what is its Tyre?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_teams_and_drivers" (
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the engine Ford Cosworth DFV 3.0 v8 has a chassis of m23 and in rounds 14-15, what is its Tyre?`:
```sql
|
SELECT "driver" FROM "championship_teams_and_drivers" WHERE "chassis"='ts16'; |
## Task
Generate a SQL query to answer the following question:
`Which driver uses the ts16 chassis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "championship_teams_and_drivers" (
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which driver uses the ts16 chassis?`:
```sql
|
SELECT "home" FROM "playoffs" WHERE "date"='april 20'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team of the game on April 20?`
### 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,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home team of the game on April 20?`:
```sql
|
SELECT "series" FROM "playoffs" WHERE "visitor"='vancouver' AND "date"='april 16'; |
## Task
Generate a SQL query to answer the following question:
`What is the series score of the game with Vancouver as the visiting team on April 16?`
### 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,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the series score of the game with Vancouver as the visiting team on April 16?`:
```sql
|
SELECT "series" FROM "playoffs" WHERE "date"='april 16'; |
## Task
Generate a SQL query to answer the following question:
`What is the series score of the game on April 16?`
### 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,
"series" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the series score of the game on April 16?`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "venue"='western oval'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the away team for venue of western oval`
### 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 `Tell me the away team for venue of western oval`:
```sql
|
SELECT "away_team_score" FROM "round_4" WHERE "date"='27 april 1974' AND "venue"='mcg'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the away team score for 27 april 1974 and veue of 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 `Tell me the away team score for 27 april 1974 and veue of mcg`:
```sql
|
SELECT "away_team" FROM "round_4" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`I want to see the away team the has a home team of richmond`
### 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 `I want to see the away team the has a home team of richmond`:
```sql
|
SELECT "venue" FROM "official_competitions" WHERE "stage"='group g' AND "date"='mar 8, 1998'; |
## Task
Generate a SQL query to answer the following question:
`What venue did group g play at on Mar 8, 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_competitions" (
"competition" text,
"stage" text,
"venue" text,
"date" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue did group g play at on Mar 8, 1998?`:
```sql
|
SELECT "stage" FROM "official_competitions" WHERE "venue"='romania'; |
## Task
Generate a SQL query to answer the following question:
`Which stage was being played in Romania?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_competitions" (
"competition" text,
"stage" text,
"venue" text,
"date" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which stage was being played in Romania?`:
```sql
|
SELECT "result" FROM "official_competitions" WHERE "competition"='1999 fifa world cup qualification (uefa)' AND "date"='nov 23, 1997'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the 1999 fifa world cup qualification (uefa) on Nov 23, 1997?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_competitions" (
"competition" text,
"stage" text,
"venue" text,
"date" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the 1999 fifa world cup qualification (uefa) on Nov 23, 1997?`:
```sql
|
SELECT "competition" FROM "official_competitions" WHERE "date"='nov 23, 2006'; |
## Task
Generate a SQL query to answer the following question:
`What was being played on Nov 23, 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "official_competitions" (
"competition" text,
"stage" text,
"venue" text,
"date" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was being played on Nov 23, 2006?`:
```sql
|
SELECT MIN("crowd") FROM "round_13" WHERE "venue"='windy hill'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest crowd at windy hill?`
### 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 lowest crowd at windy hill?`:
```sql
|
SELECT AVG("crowd") FROM "round_13" WHERE "home_team_score"='8.17 (65)'; |
## Task
Generate a SQL query to answer the following question:
`What is the crowd with a Home 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_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 crowd with a Home team score of 8.17 (65)?`:
```sql
|
SELECT "home_team_score" FROM "round_13" WHERE "away_team_score"='11.12 (78)'; |
## Task
Generate a SQL query to answer the following question:
`What home team has an Away team score of 11.12 (78)?`
### 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 home team has an Away team score of 11.12 (78)?`:
```sql
|
SELECT "date" FROM "round_13" WHERE "crowd">'12,000' AND "away_team_score"='9.16 (70)'; |
## Task
Generate a SQL query to answer the following question:
`What date has a Crowd larger than 12,000, and an Away team score of 9.16 (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 date has a Crowd larger than 12,000, and an Away team score of 9.16 (70)?`:
```sql
|
SELECT MIN("crowd") FROM "round_13" WHERE "home_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest crowd with home team richmond?`
### 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 lowest crowd with home team richmond?`:
```sql
|
SELECT "home_team" FROM "round_13" WHERE "away_team_score"='6.9 (45)'; |
## Task
Generate a SQL query to answer the following question:
`Which home team has an Away team score of 6.9 (45)?`
### 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 `Which home team has an Away team score of 6.9 (45)?`:
```sql
|
SELECT COUNT("bronze") FROM "medal_table" WHERE "total">12 AND "gold"<5; |
## Task
Generate a SQL query to answer the following question:
`When there are more than 12 total medals and less than 5 gold medals, how many bronze medals are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `When there are more than 12 total medals and less than 5 gold medals, how many bronze medals are there?`:
```sql
|
SELECT MIN("bronze") FROM "medal_table" WHERE "nation"='united states' AND "total">25; |
## Task
Generate a SQL query to answer the following question:
`When the united states won a total number of medals larger than 25, what was the lowest amount of Bronze medals won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the united states won a total number of medals larger than 25, what was the lowest amount of Bronze medals won?`:
```sql
|
SELECT MAX("bronze") FROM "medal_table" WHERE "total"<17 AND "nation"='poland' AND "gold">1; |
## Task
Generate a SQL query to answer the following question:
`When the nation of poland had less than 17 medals but more than 1 gold medal, what's the Highest number of bronze medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `When the nation of poland had less than 17 medals but more than 1 gold medal, what's the Highest number of bronze medals?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.