output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "date" FROM "round_19" WHERE "home_team"='collingwood'; |
## Task
Generate a SQL query to answer the following question:
`What is the date for home team Collingwood?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_19" (
"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 date for home team Collingwood?`:
```sql
|
SELECT "home_team_score" FROM "round_19" WHERE "home_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`What is the home team score for St Kilda?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_19" (
"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 for St Kilda?`:
```sql
|
SELECT "named_after" FROM "c" WHERE "diameter_km"<19.2 AND "latitude">-37.5 AND "longitude"<67.3; |
## Task
Generate a SQL query to answer the following question:
`Tell me the named after for diameter less than 19.2 and latitude more than -37.5 with longitude less than 67.3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the named after for diameter less than 19.2 and latitude more than -37.5 with longitude less than 67.3`:
```sql
|
SELECT "named_after" FROM "c" WHERE "latitude"=6.4; |
## Task
Generate a SQL query to answer the following question:
`Tell me the named for latitude of 6.4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the named for latitude of 6.4`:
```sql
|
SELECT "name" FROM "c" WHERE "longitude">103.8 AND "latitude"=-11.4; |
## Task
Generate a SQL query to answer the following question:
`Tell me the name for longitude more than 103.8 and latitude of -11.4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the name for longitude more than 103.8 and latitude of -11.4`:
```sql
|
SELECT SUM("longitude") FROM "c" WHERE "diameter_km"=22.6 AND "latitude"<-12.4; |
## Task
Generate a SQL query to answer the following question:
`Tell me the sum of longitude for diameter being 22.6 and latitude less than -12.4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "c" (
"name" text,
"latitude" real,
"longitude" real,
"diameter_km" real,
"named_after" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the sum of longitude for diameter being 22.6 and latitude less than -12.4`:
```sql
|
SELECT "overall" FROM "1994_draft_picks" WHERE "nationality"='united states' AND "player"='doug sproule'; |
## Task
Generate a SQL query to answer the following question:
`What was the overall pick for Doug Sproule of the United States?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1994_draft_picks" (
"round" real,
"overall" real,
"player" text,
"nationality" text,
"club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the overall pick for Doug Sproule of the United States?`:
```sql
|
SELECT MIN("viewers_m") FROM "weekly_ratings" WHERE "share">13; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest viewers (m) when the share is more than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the lowest viewers (m) when the share is more than 13?`:
```sql
|
SELECT AVG("rating") FROM "weekly_ratings" WHERE "air_date"='november 23, 2007'; |
## Task
Generate a SQL query to answer the following question:
`what is the average rating when the air date is november 23, 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the average rating when the air date is november 23, 2007?`:
```sql
|
SELECT COUNT("viewers_m") FROM "weekly_ratings" WHERE "rating"=6.4 AND "share">11; |
## Task
Generate a SQL query to answer the following question:
`what is the total viewers (m) when the rating is 6.4 and the share is more than 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "weekly_ratings" (
"episode" text,
"air_date" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"rank_timeslot" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total viewers (m) when the rating is 6.4 and the share is more than 11?`:
```sql
|
SELECT "written_by" FROM "season_5_2001" WHERE "directed_by"='terry ingram'; |
## Task
Generate a SQL query to answer the following question:
`Who wrote the episode that was directed by Terry Ingram?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who wrote the episode that was directed by Terry Ingram?`:
```sql
|
SELECT "episode_num" FROM "season_5_2001" WHERE "title"='\"the man behind the curtain\"'; |
## Task
Generate a SQL query to answer the following question:
`Which is the episode # of the episode titled "The Man Behind the Curtain"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which is the episode # of the episode titled "The Man Behind the Curtain"?`:
```sql
|
SELECT "title" FROM "season_5_2001" WHERE "directed_by"='roy dupuis'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the episode that was directed by Roy Dupuis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the title of the episode that was directed by Roy Dupuis?`:
```sql
|
SELECT "directed_by" FROM "season_5_2001" WHERE "original_airdate"='february 25, 2001'; |
## Task
Generate a SQL query to answer the following question:
`Who directed the episode that originally aired on February 25, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed the episode that originally aired on February 25, 2001?`:
```sql
|
SELECT "episode_num" FROM "season_5_2001" WHERE "original_airdate"='january 21, 2001'; |
## Task
Generate a SQL query to answer the following question:
`What is the episode # of the episode that originally aired on January 21, 2001?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the episode # of the episode that originally aired on January 21, 2001?`:
```sql
|
SELECT "directed_by" FROM "season_5_2001" WHERE "episode_num"='92 (4)'; |
## Task
Generate a SQL query to answer the following question:
`Who directed episode # 92 (4)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_5_2001" (
"episode_num" text,
"title" text,
"directed_by" text,
"written_by" text,
"original_airdate" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who directed episode # 92 (4)?`:
```sql
|
SELECT "stream_s_and_or_lake_s" FROM "current_pennsylvania_state_parks" WHERE "date_founded"=1959; |
## Task
Generate a SQL query to answer the following question:
`what is the stream(s) and / or lake(s) when the date founded is 1959?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_pennsylvania_state_parks" (
"park_name" text,
"county_or_counties" text,
"area_in_acres_ha" text,
"date_founded" real,
"stream_s_and_or_lake_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the stream(s) and / or lake(s) when the date founded is 1959?`:
```sql
|
SELECT "area_in_acres_ha" FROM "current_pennsylvania_state_parks" WHERE "park_name"='bald eagle state park'; |
## Task
Generate a SQL query to answer the following question:
`What is the area in acres (ha) for the park bald eagle state park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_pennsylvania_state_parks" (
"park_name" text,
"county_or_counties" text,
"area_in_acres_ha" text,
"date_founded" real,
"stream_s_and_or_lake_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the area in acres (ha) for the park bald eagle state park?`:
```sql
|
SELECT MAX("date_founded") FROM "current_pennsylvania_state_parks" WHERE "county_or_counties"='elk county'; |
## Task
Generate a SQL query to answer the following question:
`what is the most recent date founded in elk county?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_pennsylvania_state_parks" (
"park_name" text,
"county_or_counties" text,
"area_in_acres_ha" text,
"date_founded" real,
"stream_s_and_or_lake_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the most recent date founded in elk county?`:
```sql
|
SELECT COUNT("date_founded") FROM "current_pennsylvania_state_parks" WHERE "park_name"='beltzville state park'; |
## Task
Generate a SQL query to answer the following question:
`how many parks are name beltzville state park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "current_pennsylvania_state_parks" (
"park_name" text,
"county_or_counties" text,
"area_in_acres_ha" text,
"date_founded" real,
"stream_s_and_or_lake_s" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many parks are name beltzville state park?`:
```sql
|
SELECT AVG("rank") FROM "list_of_countries_ranked_by_the_number_o" WHERE "total"<1; |
## Task
Generate a SQL query to answer the following question:
`Which rank has a total smaller than 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_countries_ranked_by_the_number_o" (
"rank" real,
"country" text,
"continent" text,
"summer_olympics" text,
"winter_olympics" text,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which rank has a total smaller than 1?`:
```sql
|
SELECT "year" FROM "list_of_winners" WHERE "english_title"='the ocean'; |
## Task
Generate a SQL query to answer the following question:
`What is the year for the ocean?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_winners" (
"year" real,
"author" text,
"english_title" text,
"original_title" text,
"representing" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the year for the ocean?`:
```sql
|
SELECT "representing" FROM "list_of_winners" WHERE "original_title"='om fjorten dage'; |
## Task
Generate a SQL query to answer the following question:
`Name the representation for om fjorten dage`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_winners" (
"year" real,
"author" text,
"english_title" text,
"original_title" text,
"representing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the representation for om fjorten dage`:
```sql
|
SELECT "representing" FROM "list_of_winners" WHERE "original_title"='englar alheimsins'; |
## Task
Generate a SQL query to answer the following question:
`Name the representing for englar alheimsins`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_winners" (
"year" real,
"author" text,
"english_title" text,
"original_title" text,
"representing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the representing for englar alheimsins`:
```sql
|
SELECT "original_title" FROM "list_of_winners" WHERE "year"<1977 AND "author"='lagercrantz olof lagercrantz'; |
## Task
Generate a SQL query to answer the following question:
`Name the original title for years before 1977 and author of lagercrantz olof lagercrantz`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_winners" (
"year" real,
"author" text,
"english_title" text,
"original_title" text,
"representing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the original title for years before 1977 and author of lagercrantz olof lagercrantz`:
```sql
|
SELECT "representing" FROM "list_of_winners" WHERE "original_title"='ingenjör andrées luftfärd'; |
## Task
Generate a SQL query to answer the following question:
`Name the representating for ingenjör andrées luftfärd`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_winners" (
"year" real,
"author" text,
"english_title" text,
"original_title" text,
"representing" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the representating for ingenjör andrées luftfärd`:
```sql
|
SELECT "distance" FROM "stage_results" WHERE "type"='team time trial'; |
## Task
Generate a SQL query to answer the following question:
`What is the distance for the team time trial?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the distance for the team time trial?`:
```sql
|
SELECT "course" FROM "stage_results" WHERE "date"='13 may'; |
## Task
Generate a SQL query to answer the following question:
`What was the course on 13 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the course on 13 may?`:
```sql
|
SELECT "type" FROM "stage_results" WHERE "course"='rest day' AND "date"='21 may'; |
## Task
Generate a SQL query to answer the following question:
`What type has rest day as a course and was on 21 may?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "stage_results" (
"date" text,
"course" text,
"distance" text,
"type" text,
"winner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What type has rest day as a course and was on 21 may?`:
```sql
|
SELECT "race_name" FROM "non_championship_race_results" WHERE "winning_driver"='innes ireland'; |
## Task
Generate a SQL query to answer the following question:
`What's the race name that the driver Innes Ireland won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the race name that the driver Innes Ireland won?`:
```sql
|
SELECT "score" FROM "february" WHERE "visitor"='charlotte bobcats'; |
## Task
Generate a SQL query to answer the following question:
`What's the score in the home game against the Charlotte Bobcats?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "february" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the score in the home game against the Charlotte Bobcats?`:
```sql
|
SELECT "date" FROM "round_16" WHERE "venue"='victoria park'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game played at Victoria Park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game played at Victoria Park?`:
```sql
|
SELECT "home_team_score" FROM "round_16" WHERE "away_team_score"='15.9 (99)'; |
## Task
Generate a SQL query to answer the following question:
`What was the home team's score when the away team scored 15.9 (99)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the home team's score when the away team scored 15.9 (99)?`:
```sql
|
SELECT "home_team" FROM "round_16" WHERE "crowd">'13,557'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team when the crowd was larger than 13,557?`
### 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 `Who was the home team when the crowd was larger than 13,557?`:
```sql
|
SELECT "venue" FROM "round_16" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`Where did Richmond play as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_16" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did Richmond play as the away team?`:
```sql
|
SELECT "years_competed" FROM "former_clubs" WHERE "nickname"='panthers'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the years competed for panthers`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "former_clubs" (
"club" text,
"nickname" text,
"years_competed" text,
"home_ground" text,
"premierships" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the years competed for panthers`:
```sql
|
SELECT SUM("release_date") FROM "versions" WHERE "media"='cd' AND "country"='uk' AND "music_label"='eg records'; |
## Task
Generate a SQL query to answer the following question:
`What is the release date of the CD by EG Records in the UK?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "versions" (
"country" text,
"release_date" real,
"music_label" text,
"media" text,
"catalogue_number" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release date of the CD by EG Records in the UK?`:
```sql
|
SELECT AVG("release_date") FROM "versions" WHERE "music_label"='editions eg' AND "country"='netherlands'; |
## Task
Generate a SQL query to answer the following question:
`What is the release date by Editions EG in the Netherlands?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "versions" (
"country" text,
"release_date" real,
"music_label" text,
"media" text,
"catalogue_number" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release date by Editions EG in the Netherlands?`:
```sql
|
SELECT "music_label" FROM "versions" WHERE "catalogue_number"='enocd 10'; |
## Task
Generate a SQL query to answer the following question:
`What is the music label with the catalogue number enocd 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "versions" (
"country" text,
"release_date" real,
"music_label" text,
"media" text,
"catalogue_number" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the music label with the catalogue number enocd 10?`:
```sql
|
SELECT AVG("release_date") FROM "versions" WHERE "music_label"='virgin'; |
## Task
Generate a SQL query to answer the following question:
`What is the release date by Virgin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "versions" (
"country" text,
"release_date" real,
"music_label" text,
"media" text,
"catalogue_number" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the release date by Virgin?`:
```sql
|
SELECT "team" FROM "pre_season_organization" WHERE "coach"='yuriy hruznov'; |
## Task
Generate a SQL query to answer the following question:
`Which team has Yuriy Hruznov as coach?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_organization" (
"team" text,
"location" text,
"venue" text,
"league_and_position_in_1991" text,
"coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team has Yuriy Hruznov as coach?`:
```sql
|
SELECT "location" FROM "pre_season_organization" WHERE "team"='dynamo-2'; |
## Task
Generate a SQL query to answer the following question:
`Where is Dynamo-2 located?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_organization" (
"team" text,
"location" text,
"venue" text,
"league_and_position_in_1991" text,
"coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is Dynamo-2 located?`:
```sql
|
SELECT "location" FROM "pre_season_organization" WHERE "team"='shakhtar-2'; |
## Task
Generate a SQL query to answer the following question:
`Where is Shakhtar-2 located?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pre_season_organization" (
"team" text,
"location" text,
"venue" text,
"league_and_position_in_1991" text,
"coach" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is Shakhtar-2 located?`:
```sql
|
SELECT AVG("1st_prize") FROM "tournament_results" WHERE "score"='207 (-9)' AND "tournament"='gte northwest classic'; |
## Task
Generate a SQL query to answer the following question:
`For the gte northwest classic with the score of 207 (-9), what is the average 1st prize ($)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `For the gte northwest classic with the score of 207 (-9), what is the average 1st prize ($)`:
```sql
|
SELECT COUNT("1st_prize") FROM "tournament_results" WHERE "date"='sep 18'; |
## Task
Generate a SQL query to answer the following question:
`For sep 18 what is the total number of 1 prize ($)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `For sep 18 what is the total number of 1 prize ($)`:
```sql
|
SELECT "winner" FROM "tournament_results" WHERE "location"='virginia'; |
## Task
Generate a SQL query to answer the following question:
`What is the winner for Virginia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the winner for Virginia?`:
```sql
|
SELECT "date" FROM "tournament_results" WHERE "tournament"='gte north classic'; |
## Task
Generate a SQL query to answer the following question:
`On what date was the gte north classic tournament?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournament_results" (
"date" text,
"tournament" text,
"location" text,
"purse" real,
"winner" text,
"score" text,
"1st_prize" real
);
### SQL
Given the database schema, here is the SQL query that answers `On what date was the gte north classic tournament?`:
```sql
|
SELECT "date" FROM "round_21" WHERE "away_team_score"='14.19 (103)'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team score 14.19 (103)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"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 an away team score 14.19 (103)?`:
```sql
|
SELECT "home_team" FROM "round_21" WHERE "venue"='princes park'; |
## Task
Generate a SQL query to answer the following question:
`What home team plays at princes park?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"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 plays at princes park?`:
```sql
|
SELECT "date" FROM "round_21" WHERE "away_team_score"='17.8 (110)'; |
## Task
Generate a SQL query to answer the following question:
`When did an away team score 17.8 (110)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"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 an away team score 17.8 (110)?`:
```sql
|
SELECT "venue" FROM "round_21" WHERE "home_team"='fitzroy'; |
## Task
Generate a SQL query to answer the following question:
`Where does the home team fitzroy play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_21" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where does the home team fitzroy play?`:
```sql
|
SELECT "extra" FROM "achievements" WHERE "result"='2nd' AND "year"<2005; |
## Task
Generate a SQL query to answer the following question:
`Which extra resulted in 2nd before 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which extra resulted in 2nd before 2005?`:
```sql
|
SELECT "venue" FROM "achievements" WHERE "result"='2nd' AND "year"<2005; |
## Task
Generate a SQL query to answer the following question:
`Which venue resulted in 2nd before 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "achievements" (
"year" real,
"tournament" text,
"venue" text,
"result" text,
"extra" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which venue resulted in 2nd before 2005?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "loss"='wakefield (7–10)'; |
## Task
Generate a SQL query to answer the following question:
`What was the attendance at the Red Sox game that had a loss of Wakefield (7–10)?`
### 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 was the attendance at the Red Sox game that had a loss of Wakefield (7–10)?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='77–67'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the Red Sox game when they had a record of 77–67?`
### 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 was the loss of the Red Sox game when they had a record of 77–67?`:
```sql
|
SELECT "tournament" FROM "2000" WHERE "runner_up"='pat cash'; |
## Task
Generate a SQL query to answer the following question:
`Which Tournament has Pat Cash as a runner-up?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Tournament has Pat Cash as a runner-up?`:
```sql
|
SELECT "winner" FROM "2000" WHERE "third_place"='mikael pernfors' AND "tournament"='hong kong'; |
## Task
Generate a SQL query to answer the following question:
`Who is the winner for the Tournament in Hong Kong with a third place winner named Mikael Pernfors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2000" (
"tournament" text,
"winner" text,
"runner_up" text,
"score" text,
"third_place" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the winner for the Tournament in Hong Kong with a third place winner named Mikael Pernfors?`:
```sql
|
SELECT "nationality" FROM "women" WHERE "event"='10000 m'; |
## Task
Generate a SQL query to answer the following question:
`What was the nationality of the athlete that ran the 10000 m event?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women" (
"event" text,
"record" text,
"athlete" text,
"nationality" text,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the nationality of the athlete that ran the 10000 m event?`:
```sql
|
SELECT COUNT("points") FROM "final_table" WHERE "wins"<21 AND "club"='palamós cf' AND "goals_for"<40; |
## Task
Generate a SQL query to answer the following question:
`What is the number of points of palamós cf, which has less than 21 wins and less than 40 goals?`
### 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 number of points of palamós cf, which has less than 21 wins and less than 40 goals?`:
```sql
|
SELECT "club" FROM "final_table" WHERE "goals_against">46 AND "wins"=10 AND "goal_difference"=-24; |
## Task
Generate a SQL query to answer the following question:
`Which club has more than 46 goals, 10 wins, and a goal difference of -24?`
### 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 `Which club has more than 46 goals, 10 wins, and a goal difference of -24?`:
```sql
|
SELECT "away_team_score" FROM "round_17" WHERE "away_team"='richmond'; |
## Task
Generate a SQL query to answer the following question:
`What is Richmond score as the away team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Richmond score as the away team?`:
```sql
|
SELECT "pole_position" FROM "grands_prix" WHERE "round"<2; |
## Task
Generate a SQL query to answer the following question:
`Tell me the pole position with round less than 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the pole position with round less than 2`:
```sql
|
SELECT "fastest_lap" FROM "grands_prix" WHERE "round"=16; |
## Task
Generate a SQL query to answer the following question:
`I want the fastest lap for round of 16`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "grands_prix" (
"round" real,
"grand_prix" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `I want the fastest lap for round of 16`:
```sql
|
SELECT "record" FROM "january" WHERE "home"='nashville'; |
## Task
Generate a SQL query to answer the following question:
`Which Record has a home of Nashville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Record has a home of Nashville?`:
```sql
|
SELECT "visitor" FROM "january" WHERE "date"='january 17'; |
## Task
Generate a SQL query to answer the following question:
`Which Visitor played on January 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Visitor played on January 17?`:
```sql
|
SELECT "record" FROM "december" WHERE "visitor"='nashville' AND "decision"='ellis' AND "game">32; |
## Task
Generate a SQL query to answer the following question:
`Which game later than number 32 had both Ellis for the decision and Nashville as the visiting team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"game" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which game later than number 32 had both Ellis for the decision and Nashville as the visiting team?`:
```sql
|
SELECT "visitor" FROM "december" WHERE "game">29 AND "attendance">'18,584'; |
## Task
Generate a SQL query to answer the following question:
`Who was the visiting team in the game sometime after number 29 that had 18,584 atttendees?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "december" (
"game" real,
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the visiting team in the game sometime after number 29 that had 18,584 atttendees?`:
```sql
|
SELECT SUM("crowd") FROM "round_6" WHERE "away_team_score"='9.21 (75)'; |
## Task
Generate a SQL query to answer the following question:
`Which Crowd has an Away team score of 9.21 (75)?`
### 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 `Which Crowd has an Away team score of 9.21 (75)?`:
```sql
|
SELECT "vca_155" FROM "tam_variants" WHERE "vcpc"='75km/h (47mph)'; |
## Task
Generate a SQL query to answer the following question:
`If there is a VCPC of 75km/h (47mph) what is the VCA?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tam_variants" (
"vctp" text,
"vca_155" text,
"vctm" text,
"vcpc" text,
"vclc" text,
"vcrt" text
);
### SQL
Given the database schema, here is the SQL query that answers `If there is a VCPC of 75km/h (47mph) what is the VCA?`:
```sql
|
SELECT "vctp" FROM "tam_variants" WHERE "vcrt"='7.62mm (0.3in) fn mag 60-20 machine gun'; |
## Task
Generate a SQL query to answer the following question:
`If there is a VCRT of 7.62mm (0.3in) fn mag 60-20 machine gun, what is the VCTP of that?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tam_variants" (
"vctp" text,
"vca_155" text,
"vctm" text,
"vcpc" text,
"vclc" text,
"vcrt" text
);
### SQL
Given the database schema, here is the SQL query that answers `If there is a VCRT of 7.62mm (0.3in) fn mag 60-20 machine gun, what is the VCTP of that?`:
```sql
|
SELECT "airing_date" FROM "second_line_series" WHERE "genre"='modern drama' AND "number_of_episodes">21; |
## Task
Generate a SQL query to answer the following question:
`What is the airing date for a modern drama with more than 21 episodes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"genre" text,
"official_website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the airing date for a modern drama with more than 21 episodes?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "race"='german grand prix'; |
## Task
Generate a SQL query to answer the following question:
`What was the Constructor for the German Grand Prix Race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Constructor for the German Grand Prix Race?`:
```sql
|
SELECT "race" FROM "season_review" WHERE "race_winner"='michele alboreto'; |
## Task
Generate a SQL query to answer the following question:
`What Race did Michele Alboreto win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Race did Michele Alboreto win?`:
```sql
|
SELECT "constructor" FROM "season_review" WHERE "fastest_lap"='derek warwick'; |
## Task
Generate a SQL query to answer the following question:
`What was the Constructor for the race that had Derek Warwick as its Fastest Lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Constructor for the race that had Derek Warwick as its Fastest Lap?`:
```sql
|
SELECT "race" FROM "season_review" WHERE "fastest_lap"='niki lauda' AND "location"='brands hatch'; |
## Task
Generate a SQL query to answer the following question:
`What Brands Hatch race had Niki Lauda as its Fastest Lap?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What Brands Hatch race had Niki Lauda as its Fastest Lap?`:
```sql
|
SELECT "report" FROM "season_review" WHERE "location"='monaco'; |
## Task
Generate a SQL query to answer the following question:
`What was the Report for the Monaco race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"race" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"race_winner" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the Report for the Monaco race?`:
```sql
|
SELECT "nation" FROM "all_time_medal_table" WHERE "total"=59; |
## Task
Generate a SQL query to answer the following question:
`What was the nation that had 59 totals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "all_time_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 was the nation that had 59 totals?`:
```sql
|
SELECT "date" FROM "season_review" WHERE "winning_driver"='ayrton senna' AND "location"='imola'; |
## Task
Generate a SQL query to answer the following question:
`On what date did Ayrton Senna win at Imola?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `On what date did Ayrton Senna win at Imola?`:
```sql
|
SELECT "fastest_lap" FROM "season_review" WHERE "winning_driver"='ayrton senna' AND "date"='23 april'; |
## Task
Generate a SQL query to answer the following question:
`Who had the fastest lap of the race that Ayrton Senna won on 23 April?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the fastest lap of the race that Ayrton Senna won on 23 April?`:
```sql
|
SELECT "grand_prix" FROM "season_review" WHERE "location"='jerez'; |
## Task
Generate a SQL query to answer the following question:
`Which Grand Prix is located in Jerez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Grand Prix is located in Jerez?`:
```sql
|
SELECT "pole_position" FROM "season_review" WHERE "location"='jerez'; |
## Task
Generate a SQL query to answer the following question:
`Who had the pole position in Jerez?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who had the pole position in Jerez?`:
```sql
|
SELECT "report" FROM "season_review" WHERE "winning_driver"='ayrton senna' AND "date"='27 august'; |
## Task
Generate a SQL query to answer the following question:
`What is the report for the race that Ayrton Senna won on 27 August?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "season_review" (
"grand_prix" text,
"date" text,
"location" text,
"pole_position" text,
"fastest_lap" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the report for the race that Ayrton Senna won on 27 August?`:
```sql
|
SELECT SUM("gold") FROM "medal_count" WHERE "nation"='united states' AND "silver">3; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of gold medals for the United States with silver medal count greater than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of gold medals for the United States with silver medal count greater than 3?`:
```sql
|
SELECT COUNT("total") FROM "medal_count" WHERE "silver">6 AND "nation"='norway' AND "gold">10; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of medals of Norway with a silver medal count greater than 6 and a gold medal count greater than 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of medals of Norway with a silver medal count greater than 6 and a gold medal count greater than 10?`:
```sql
|
SELECT MIN("bronze") FROM "medal_count" WHERE "gold"<6 AND "nation"='italy' AND "total">10; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest bronze medal count for Italy with fewer than 6 gold medals and greater than 10 total medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest bronze medal count for Italy with fewer than 6 gold medals and greater than 10 total medals?`:
```sql
|
SELECT AVG("silver") FROM "medal_count" WHERE "rank">7 AND "total"=6 AND "bronze"<2; |
## Task
Generate a SQL query to answer the following question:
`On average, what is the number of silver medals for nations ranking higher than 7, with a total of 6 medals and fewer than 2 bronze medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `On average, what is the number of silver medals for nations ranking higher than 7, with a total of 6 medals and fewer than 2 bronze medals?`:
```sql
|
SELECT MAX("total") FROM "medal_count" WHERE "bronze">2 AND "rank">3 AND "nation"='united states' AND "silver">3; |
## Task
Generate a SQL query to answer the following question:
`For the United States, with greater than 2 bronze metals, greater than 3 silver medals, and a rank higher than 3, what is the highest total number of medals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_count" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
### SQL
Given the database schema, here is the SQL query that answers `For the United States, with greater than 2 bronze metals, greater than 3 silver medals, and a rank higher than 3, what is the highest total number of medals?`:
```sql
|
SELECT "player" FROM "m" WHERE "years_for_jazz"='1975-79'; |
## Task
Generate a SQL query to answer the following question:
`Which player was active in Jazz in 1975-79?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player was active in Jazz in 1975-79?`:
```sql
|
SELECT "nationality" FROM "m" WHERE "position"='guard' AND "school_club_team"='bowling green'; |
## Task
Generate a SQL query to answer the following question:
`What is the nationality for the guard position from Bowling Green?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nationality for the guard position from Bowling Green?`:
```sql
|
SELECT "player" FROM "m" WHERE "school_club_team"='auburn'; |
## Task
Generate a SQL query to answer the following question:
`Who is the player from Auburn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the player from Auburn?`:
```sql
|
SELECT "player" FROM "m" WHERE "position"='shooting guard'; |
## Task
Generate a SQL query to answer the following question:
`Which player is a shooting guard?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player is a shooting guard?`:
```sql
|
SELECT "position" FROM "m" WHERE "years_for_jazz"='2002-03'; |
## Task
Generate a SQL query to answer the following question:
`Which position was active in Jazz in 2002-03?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "m" (
"player" text,
"nationality" text,
"position" text,
"years_for_jazz" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which position was active in Jazz in 2002-03?`:
```sql
|
SELECT COUNT("swimsuit") FROM "preliminary_competition" WHERE "evening_gown"=8.329 AND "average"<8.497; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of swimsuits when evening gown is 8.329 and average is less than 8.497`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of swimsuits when evening gown is 8.329 and average is less than 8.497`:
```sql
|
SELECT SUM("swimsuit") FROM "preliminary_competition" WHERE "average"<7.362 AND "evening_gown"<6.983; |
## Task
Generate a SQL query to answer the following question:
`Name the sum of swimsuit when the evening gown is less than 6.983 and the average is less than 7.362`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the sum of swimsuit when the evening gown is less than 6.983 and the average is less than 7.362`:
```sql
|
SELECT MAX("interview") FROM "preliminary_competition" WHERE "state"='minnesota' AND "average">7.901; |
## Task
Generate a SQL query to answer the following question:
`Name the most interview for minnesota and average more than 7.901`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "preliminary_competition" (
"state" text,
"interview" real,
"swimsuit" real,
"evening_gown" real,
"average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most interview for minnesota and average more than 7.901`:
```sql
|
SELECT MAX("decile") FROM "rodney_local_board" WHERE "roll">325 AND "area"='warkworth'; |
## Task
Generate a SQL query to answer the following question:
`Name the highest Decile for roll more than 325 and area of warkworth`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rodney_local_board" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the highest Decile for roll more than 325 and area of warkworth`:
```sql
|
SELECT "authority" FROM "rodney_local_board" WHERE "roll"=54; |
## Task
Generate a SQL query to answer the following question:
`Name the authority for roll of 54`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "rodney_local_board" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the authority for roll of 54`:
```sql
|
SELECT "score1" FROM "friendly" WHERE "match"=2; |
## Task
Generate a SQL query to answer the following question:
`What was the score of Match 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "friendly" (
"match" real,
"date" text,
"competition_or_tour" text,
"ground" text,
"opponent" text,
"score1" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of Match 2?`:
```sql
|
SELECT "away_team" FROM "round_8" WHERE "away_team_score"='11.11 (77)'; |
## Task
Generate a SQL query to answer the following question:
`Which away team had a score of 11.11 (77)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which away team had a score of 11.11 (77)?`:
```sql
|
SELECT "date" FROM "round_8" WHERE "home_team"='essendon'; |
## Task
Generate a SQL query to answer the following question:
`When did Essendon play at home?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_8" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did Essendon play at home?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.