output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "loss" FROM "game_log" WHERE "opponent"='indians' AND "record"='15-15'; |
## Task
Generate a SQL query to answer the following question:
`What was the loss of the game against the Indians when the record was 15-15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the loss of the game against the Indians when the record was 15-15?`:
```sql
|
SELECT COUNT("attendance") FROM "game_log" WHERE "record"='23-23'; |
## Task
Generate a SQL query to answer the following question:
`What is the total attendance for games when the record was 23-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" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total attendance for games when the record was 23-23?`:
```sql
|
SELECT COUNT("points") FROM "seasons_since_1970" WHERE "division"='conference' AND "league_pos"='9th' AND "lost"<13; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of points for the conference division, a league position of 9th, and a lost result less than 13?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons_since_1970" (
"division" text,
"drawn" real,
"lost" real,
"points" real,
"league_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total number of points for the conference division, a league position of 9th, and a lost result less than 13?`:
```sql
|
SELECT SUM("drawn") FROM "seasons_since_1970" WHERE "league_pos"='15th' AND "lost">17; |
## Task
Generate a SQL query to answer the following question:
`What is the drawn result with a league position of 15th and a lost result that is more than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "seasons_since_1970" (
"division" text,
"drawn" real,
"lost" real,
"points" real,
"league_pos" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the drawn result with a league position of 15th and a lost result that is more than 17?`:
```sql
|
SELECT "2014" FROM "competition_timeline" WHERE "2003_04"='did not participate' AND "2005"='did not participate'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2014 which has a 2003-04 of did not participate and a 2005 of did not participate`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2014 which has a 2003-04 of did not participate and a 2005 of did not participate`:
```sql
|
SELECT "competition" FROM "competition_timeline" WHERE "2010"='dnp'; |
## Task
Generate a SQL query to answer the following question:
`Name the competition of 2010 of dnp`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the competition of 2010 of dnp`:
```sql
|
SELECT "1999_2000" FROM "competition_timeline" WHERE "1993_94"='did not participate'; |
## Task
Generate a SQL query to answer the following question:
`Name the 1999-2000 for 1993-94 of did not participate`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 1999-2000 for 1993-94 of did not participate`:
```sql
|
SELECT "2005" FROM "competition_timeline" WHERE "2001_02"='sf'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2005 when 2001-02 is sf`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2005 when 2001-02 is sf`:
```sql
|
SELECT "2012" FROM "competition_timeline" WHERE "2000_01"='1st'; |
## Task
Generate a SQL query to answer the following question:
`Name the 2012 which has 2000-01 of 1st`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the 2012 which has 2000-01 of 1st`:
```sql
|
SELECT "score" FROM "november" WHERE "visitor"='columbus'; |
## Task
Generate a SQL query to answer the following question:
`Name the score for columbus visitor`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Name the score for columbus visitor`:
```sql
|
SELECT MIN("attendance") FROM "november" WHERE "visitor"='edmonton'; |
## Task
Generate a SQL query to answer the following question:
`Name the least attendance with visitor of edmonton`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "november" (
"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 `Name the least attendance with visitor of edmonton`:
```sql
|
SELECT MIN("lane") FROM "semifinal_1" WHERE "name"='sue rolph' AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest numbered lane of Sue Rolph with a rank under 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest numbered lane of Sue Rolph with a rank under 5?`:
```sql
|
SELECT "lane" FROM "semifinal_1" WHERE "time"=55.69; |
## Task
Generate a SQL query to answer the following question:
`What is the lane number of the swimmer with a time of 55.69?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lane number of the swimmer with a time of 55.69?`:
```sql
|
SELECT MIN("league_cup") FROM "goalscorers" WHERE "championship"=4; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest number of league cups with 4 championships?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest number of league cups with 4 championships?`:
```sql
|
SELECT MAX("fa_cup") FROM "goalscorers" WHERE "total"='0 4' AND "championship"<4; |
## Task
Generate a SQL query to answer the following question:
`What is the highest value for FA cups, that has a total of 0 4, with less than 4 championships?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest value for FA cups, that has a total of 0 4, with less than 4 championships?`:
```sql
|
SELECT MIN("fa_cup") FROM "goalscorers" WHERE "total"='0 2' AND "league_cup"<0; |
## Task
Generate a SQL query to answer the following question:
`How many FA cups were there without any league cups, but a total of 0 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many FA cups were there without any league cups, but a total of 0 2?`:
```sql
|
SELECT "player" FROM "round_three" WHERE "pick_num"='41'; |
## Task
Generate a SQL query to answer the following question:
`Who is Pick #41?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is Pick #41?`:
```sql
|
SELECT "player" FROM "round_three" WHERE "pick_num"='40'; |
## Task
Generate a SQL query to answer the following question:
`Which player was Pick #40?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player was Pick #40?`:
```sql
|
SELECT "nhl_team" FROM "round_three" WHERE "player"='dave bonter'; |
## Task
Generate a SQL query to answer the following question:
`Which team picked Dave Bonter?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team picked Dave Bonter?`:
```sql
|
SELECT "nhl_team" FROM "round_three" WHERE "college_junior_club_team"='toronto marlboros (oha)' AND "pick_num"='32'; |
## Task
Generate a SQL query to answer the following question:
`Which team picked the player from the Toronto Marlboros (OHA) as Pick #32?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team picked the player from the Toronto Marlboros (OHA) as Pick #32?`:
```sql
|
SELECT MAX("games") FROM "results" WHERE "league"='eredivisie' AND "manager"='jurrie koolhof' AND "goals"<10; |
## Task
Generate a SQL query to answer the following question:
`Name the most games for eredivisie when jurrie koolhof is manager when goals are less than 10`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" text,
"league" text,
"rank" real,
"games" real,
"points" real,
"manager" text,
"top_scorer" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the most games for eredivisie when jurrie koolhof is manager when goals are less than 10`:
```sql
|
SELECT MIN("rank") FROM "results" WHERE "games">34 AND "season"='2009-10'; |
## Task
Generate a SQL query to answer the following question:
`Name the least rank when games are more than 34 and the season is 2009-10`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "results" (
"season" text,
"league" text,
"rank" real,
"games" real,
"points" real,
"manager" text,
"top_scorer" text,
"goals" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least rank when games are more than 34 and the season is 2009-10`:
```sql
|
SELECT MIN("points") FROM "motorcycle_grand_prix_results" WHERE "team"='mv agusta' AND "rank"='13th' AND "wins"<0; |
## Task
Generate a SQL query to answer the following question:
`Name the least point for mv agusta and rank of 13th for wins less than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the least point for mv agusta and rank of 13th for wins less than 0`:
```sql
|
SELECT "rank" FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "points"=2; |
## Task
Generate a SQL query to answer the following question:
`Name the rank for wins of 0 and points of 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the rank for wins of 0 and points of 2`:
```sql
|
SELECT COUNT("points") FROM "motorcycle_grand_prix_results" WHERE "year"<1955 AND "rank"='5th' AND "wins"<0; |
## Task
Generate a SQL query to answer the following question:
`Name the total number of points with year less than 1955 and rank of 5th with wins less than 0`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
### SQL
Given the database schema, here is the SQL query that answers `Name the total number of points with year less than 1955 and rank of 5th with wins less than 0`:
```sql
|
SELECT SUM("decile") FROM "south_taranaki_district" WHERE "area"='normanby' AND "roll"<157; |
## Task
Generate a SQL query to answer the following question:
`What is the total decile in the area of Normanby with a roller smaller than 157?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_taranaki_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total decile in the area of Normanby with a roller smaller than 157?`:
```sql
|
SELECT "authority" FROM "south_taranaki_district" WHERE "decile">5 AND "roll"=170; |
## Task
Generate a SQL query to answer the following question:
`What Authority has a decile greater than 5, with a roll of 170?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "south_taranaki_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
### SQL
Given the database schema, here is the SQL query that answers `What Authority has a decile greater than 5, with a roll of 170?`:
```sql
|
SELECT AVG("goals_against_average") FROM "goaltending_leaders" WHERE "games_played">78; |
## Task
Generate a SQL query to answer the following question:
`What is the average goals against average for those playing more than 78 games?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average goals against average for those playing more than 78 games?`:
```sql
|
SELECT "player" FROM "goaltending_leaders" WHERE "games_played">46 AND "goals_allowed"<195; |
## Task
Generate a SQL query to answer the following question:
`Who played over 46 games and allowed less than 195 goals?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who played over 46 games and allowed less than 195 goals?`:
```sql
|
SELECT "player" FROM "goaltending_leaders" WHERE "goals_against_average">2.07 AND "games_played"=44; |
## Task
Generate a SQL query to answer the following question:
`Who played 44 games who averaged over 2.07 goals against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
### SQL
Given the database schema, here is the SQL query that answers `Who played 44 games who averaged over 2.07 goals against?`:
```sql
|
SELECT "how_ashtagrama_iyers_say_it" FROM "language" WHERE "pure_tamil"='engal veetil, engal agathil'; |
## Task
Generate a SQL query to answer the following question:
`Name how ashtagrama lyers say it for engal veetil, engal agathil`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name how ashtagrama lyers say it for engal veetil, engal agathil`:
```sql
|
SELECT "english_meaning" FROM "language" WHERE "how_other_tamils_say_it"='engey poringo'; |
## Task
Generate a SQL query to answer the following question:
`Name the english meaning for engey poringo`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the english meaning for engey poringo`:
```sql
|
SELECT "how_other_iyers_say_it" FROM "language" WHERE "how_ashtagrama_iyers_say_it"='enga ullale'; |
## Task
Generate a SQL query to answer the following question:
`Name how other lyers say enga ullale`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name how other lyers say enga ullale`:
```sql
|
SELECT "pure_tamil" FROM "language" WHERE "how_other_iyers_say_it"='enga athilae'; |
## Task
Generate a SQL query to answer the following question:
`Name the pure tamil for enga athilae`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the pure tamil for enga athilae`:
```sql
|
SELECT "company" FROM "the_largest_ferries_of_europe" WHERE "built"=1998 AND "ship"='excellent'; |
## Task
Generate a SQL query to answer the following question:
`What company built the ship named excellent in 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_largest_ferries_of_europe" (
"ship" text,
"length" text,
"passengers" real,
"speed" text,
"built" real,
"company" text,
"registry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What company built the ship named excellent in 1998?`:
```sql
|
SELECT COUNT("built") FROM "the_largest_ferries_of_europe" WHERE "registry"='united kingdom' AND "passengers"='1,300'; |
## Task
Generate a SQL query to answer the following question:
`What's the total built by the United Kingdom and holds 1,300 passengers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "the_largest_ferries_of_europe" (
"ship" text,
"length" text,
"passengers" real,
"speed" text,
"built" real,
"company" text,
"registry" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the total built by the United Kingdom and holds 1,300 passengers?`:
```sql
|
SELECT "visiting_team" FROM "2005" WHERE "stadium"='ralph wilson stadium'; |
## Task
Generate a SQL query to answer the following question:
`Name the visiting team for stadium of ralph wilson stadium`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the visiting team for stadium of ralph wilson stadium`:
```sql
|
SELECT "date" FROM "2005" WHERE "visiting_team"='denver broncos'; |
## Task
Generate a SQL query to answer the following question:
`Name the date for visiting team of denver broncos`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date for visiting team of denver broncos`:
```sql
|
SELECT "stadium" FROM "2005" WHERE "host_team"='san diego chargers' AND "final_score"='23-45'; |
## Task
Generate a SQL query to answer the following question:
`Name the stadium with host team of san diego chargers and final score of 23-45`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the stadium with host team of san diego chargers and final score of 23-45`:
```sql
|
SELECT "stadium" FROM "2005" WHERE "final_score"='20-10'; |
## Task
Generate a SQL query to answer the following question:
`Name the stadium with final score of 20-10`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the stadium with final score of 20-10`:
```sql
|
SELECT "date" FROM "2005" WHERE "visiting_team"='philadelphia eagles'; |
## Task
Generate a SQL query to answer the following question:
`Name the date with visiting team of philadelphia eagles`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the date with visiting team of philadelphia eagles`:
```sql
|
SELECT "host_team" FROM "2005" WHERE "date"='january 1 (2006)'; |
## Task
Generate a SQL query to answer the following question:
`Name the host team for january 1 (2006)`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the host team for january 1 (2006)`:
```sql
|
SELECT "team" FROM "2008_regular_season_football_standings" WHERE "school"='delmar'; |
## Task
Generate a SQL query to answer the following question:
`What team belongs to Delmar?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team belongs to Delmar?`:
```sql
|
SELECT "division_record" FROM "2008_regular_season_football_standings" WHERE "school"='laurel'; |
## Task
Generate a SQL query to answer the following question:
`What was Laurel's division record?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was Laurel's division record?`:
```sql
|
SELECT MIN("rank") FROM "passenger_statistics" WHERE "code_iata_icao"='bcm/lrbc' AND "2010">'240,735'; |
## Task
Generate a SQL query to answer the following question:
`What is the rank of airport with a (IATA/ICAO) of bcm/lrbc code and an amount of 240,735 in 2010?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the rank of airport with a (IATA/ICAO) of bcm/lrbc code and an amount of 240,735 in 2010?`:
```sql
|
SELECT AVG("2008") FROM "passenger_statistics" WHERE "2010"='240,735' AND "rank"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the average for the year 2008 of the team that in 2010 had an average of 240,735 with rank lower than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average for the year 2008 of the team that in 2010 had an average of 240,735 with rank lower than 5?`:
```sql
|
SELECT "2010" FROM "passenger_statistics" WHERE "code_iata_icao"='cra/lrcv'; |
## Task
Generate a SQL query to answer the following question:
`What is the average in 2010 of the team with a code of (IATA/ICAO) or cra/lrcv?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average in 2010 of the team with a code of (IATA/ICAO) or cra/lrcv?`:
```sql
|
SELECT "state_ranked_in_partisan_order" FROM "partisan_mix_of_the_house_by_state" WHERE "percentage_republicans"='67%' AND "republican_democratic"='24/12'; |
## Task
Generate a SQL query to answer the following question:
`Which state has 67% Republicans and a ratio of 24/12 of Republicans to Democrats?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which state has 67% Republicans and a ratio of 24/12 of Republicans to Democrats?`:
```sql
|
SELECT "state_ranked_in_partisan_order" FROM "partisan_mix_of_the_house_by_state" WHERE "percentage_democrats"='25%' AND "republican_democratic"='6/2'; |
## Task
Generate a SQL query to answer the following question:
`What state is 25% Democrats has a ratio of 6/2 of Republicans to Democrats?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
### SQL
Given the database schema, here is the SQL query that answers `What state is 25% Democrats has a ratio of 6/2 of Republicans to Democrats?`:
```sql
|
SELECT "republican_democratic" FROM "partisan_mix_of_the_house_by_state" WHERE "state_ranked_in_partisan_order"='south carolina'; |
## Task
Generate a SQL query to answer the following question:
`What is the ratio of Republicans to Democrats in South Carolina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the ratio of Republicans to Democrats in South Carolina?`:
```sql
|
SELECT "republican_seat_plurality" FROM "partisan_mix_of_the_house_by_state" WHERE "republican_democratic"='12/4'; |
## Task
Generate a SQL query to answer the following question:
`What is the Republican seat plurality of the state with a ratio of 12/4 Republicans to Democrats?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Republican seat plurality of the state with a ratio of 12/4 Republicans to Democrats?`:
```sql
|
SELECT "republican_seat_plurality" FROM "partisan_mix_of_the_house_by_state" WHERE "state_ranked_in_partisan_order"='north carolina'; |
## Task
Generate a SQL query to answer the following question:
`What is the Republican seat plurality of North Carolina?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Republican seat plurality of North Carolina?`:
```sql
|
SELECT MAX("round_4") FROM "tournaments" WHERE "score"=284 AND "year">1998; |
## Task
Generate a SQL query to answer the following question:
`What is the highest score in round 4 and total of 284 in a year more recent than 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest score in round 4 and total of 284 in a year more recent than 1998?`:
```sql
|
SELECT MAX("money") FROM "tournaments" WHERE "round_2"=65 AND "round_4"<67; |
## Task
Generate a SQL query to answer the following question:
`What is the maximum ¥ for a round 2 score of 65 and a round 4 score smaller than 67?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the maximum ¥ for a round 2 score of 65 and a round 4 score smaller than 67?`:
```sql
|
SELECT MIN("year") FROM "tournaments" WHERE "tournament"='dunlop phoenix tournament' AND "round_4">72; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year when the Dunlop Phoenix Tournament was played with a round 4 score larger than 72?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year when the Dunlop Phoenix Tournament was played with a round 4 score larger than 72?`:
```sql
|
SELECT MIN("round_1") FROM "tournaments" WHERE "place"='t15' AND "year"<1998; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest round with a place of t15 in a year earlier than 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest round with a place of t15 in a year earlier than 1998?`:
```sql
|
SELECT "venue" FROM "non_championship_results" WHERE "driver"='emerson fittipaldi' AND "event"='brdc international trophy'; |
## Task
Generate a SQL query to answer the following question:
`Where was the BRDC International Trophy with driver Emerson Fittipaldi held?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where was the BRDC International Trophy with driver Emerson Fittipaldi held?`:
```sql
|
SELECT MAX("year") FROM "non_championship_results" WHERE "venue"='kyalami' AND "driver"='keke rosberg'; |
## Task
Generate a SQL query to answer the following question:
`What was the most recent race at Kyalami with Keke Rosberg competing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the most recent race at Kyalami with Keke Rosberg competing?`:
```sql
|
SELECT "year" FROM "non_championship_results" WHERE "event"='spanish grand prix' AND "driver"='emerson fittipaldi'; |
## Task
Generate a SQL query to answer the following question:
`What year was the Spanish Grand Prix where Emerson Fittipaldi drove?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was the Spanish Grand Prix where Emerson Fittipaldi drove?`:
```sql
|
SELECT "result" FROM "non_championship_results" WHERE "venue"='jarama' AND "driver"='emerson fittipaldi'; |
## Task
Generate a SQL query to answer the following question:
`What was the outcome for Emerson Fittipaldi in the race held at Jarama?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the outcome for Emerson Fittipaldi in the race held at Jarama?`:
```sql
|
SELECT COUNT("year") FROM "non_championship_results" WHERE "driver"='wilson fittipaldi'; |
## Task
Generate a SQL query to answer the following question:
`How many years did Wilson Fittipaldi race?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many years did Wilson Fittipaldi race?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "loss"='cox (6–2)'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game that had a loss of Cox (6–2)?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game that had a loss of Cox (6–2)?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "loss"='rojas (9–8)'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game that had a loss of Rojas (9–8)?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game that had a loss of Rojas (9–8)?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "loss"='coates (0–2)'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game that had a loss of Coates (0–2)?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game that had a loss of Coates (0–2)?`:
```sql
|
SELECT "score" FROM "game_log" WHERE "record"='58–47'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game when the record was 58–47?`
### 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,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score of the game when the record was 58–47?`:
```sql
|
SELECT "hebrew_word" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "strong_s_transliteration"='yowyaqiym'; |
## Task
Generate a SQL query to answer the following question:
`Strong's Transliteration of yowyaqiym is what Hebrew word?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
### SQL
Given the database schema, here is the SQL query that answers `Strong's Transliteration of yowyaqiym is what Hebrew word?`:
```sql
|
SELECT "english_spelling" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "hebrew_word"='יְהוֹשָפָט'; |
## Task
Generate a SQL query to answer the following question:
`How do you spell the Hebrew word יְהוֹשָפָט in English?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
### SQL
Given the database schema, here is the SQL query that answers `How do you spell the Hebrew word יְהוֹשָפָט in English?`:
```sql
|
SELECT "strong_s_transliteration" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "english_spelling"='joshaphat'; |
## Task
Generate a SQL query to answer the following question:
`What's the english word joshaphat in Strong's Transliteration?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the english word joshaphat in Strong's Transliteration?`:
```sql
|
SELECT "start" FROM "indy_500_results" WHERE "year"='1956'; |
## Task
Generate a SQL query to answer the following question:
`Which start has 1956 as the year?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which start has 1956 as the year?`:
```sql
|
SELECT "start" FROM "indy_500_results" WHERE "finish"='32' AND "laps">6; |
## Task
Generate a SQL query to answer the following question:
`Which start has 32 as the finish and laps more than 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which start has 32 as the finish and laps more than 6?`:
```sql
|
SELECT "start" FROM "indy_500_results" WHERE "rank"='4'; |
## Task
Generate a SQL query to answer the following question:
`Which start has 4 as a rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which start has 4 as a rank?`:
```sql
|
SELECT COUNT("laps") FROM "indy_500_results" WHERE "start"='1'; |
## Task
Generate a SQL query to answer the following question:
`How many laps have 1 as the start?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many laps have 1 as the start?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "rank"='33' AND "laps"=200; |
## Task
Generate a SQL query to answer the following question:
`Which finish has 33 as a rank and 200 for laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which finish has 33 as a rank and 200 for laps?`:
```sql
|
SELECT "finish" FROM "indy_500_results" WHERE "rank"='1'; |
## Task
Generate a SQL query to answer the following question:
`Which finish has 1 as the rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which finish has 1 as the rank?`:
```sql
|
SELECT "special_notes" FROM "one_dollar" WHERE "issue_price"<24.95 AND "theme"='edmonton oilers'; |
## Task
Generate a SQL query to answer the following question:
`What are the special notes for an issue price under 24.95 with an edmonton oilers theme?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the special notes for an issue price under 24.95 with an edmonton oilers theme?`:
```sql
|
SELECT "theme" FROM "one_dollar" WHERE "special_notes"='from calgary flames gift set'; |
## Task
Generate a SQL query to answer the following question:
`What theme has special notes from calgary flames gift set?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What theme has special notes from calgary flames gift set?`:
```sql
|
SELECT COUNT("year") FROM "one_dollar" WHERE "issue_price">15.95 AND "special_notes"='from edmonton oilers gift set'; |
## Task
Generate a SQL query to answer the following question:
`What year has an issue price over 15.95, and a special notes from edmonton oilers gift set?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year has an issue price over 15.95, and a special notes from edmonton oilers gift set?`:
```sql
|
SELECT "site" FROM "construction" WHERE "superintendent"='john barry'; |
## Task
Generate a SQL query to answer the following question:
`What is the site when the superintendent was John Barry?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the site when the superintendent was John Barry?`:
```sql
|
SELECT "guns" FROM "construction" WHERE "superintendent"='silas talbot'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of guns when the superintendent was Silas Talbot?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of guns when the superintendent was Silas Talbot?`:
```sql
|
SELECT "site" FROM "construction" WHERE "superintendent"='james sever'; |
## Task
Generate a SQL query to answer the following question:
`What is the site when the superintendent was James Sever?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the site when the superintendent was James Sever?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "record"='65-53'; |
## Task
Generate a SQL query to answer the following question:
`Who was the loss in the game with the record of 65-53?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the loss in the game with the record of 65-53?`:
```sql
|
SELECT "record" FROM "game_log" WHERE "opponent"='rangers' AND "date"='august 29'; |
## Task
Generate a SQL query to answer the following question:
`On August 29, What was the record playing against the Rangers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On August 29, What was the record playing against the Rangers?`:
```sql
|
SELECT "attendance" FROM "game_log" WHERE "date"='august 22'; |
## Task
Generate a SQL query to answer the following question:
`On August 22, how many people came to the game?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `On August 22, how many people came to the game?`:
```sql
|
SELECT MIN("west_indies") FROM "totals_up_to_and_including_the_5th_test_" WHERE "holder_at_the_end_of_the_series"='west indies' AND "england">1 AND "season"='1991'; |
## Task
Generate a SQL query to answer the following question:
`When west indes was a holder at the end of the series for the 1991 season with an england greater than 1, what is the smallest west indies?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "totals_up_to_and_including_the_5th_test_" (
"series" text,
"season" text,
"host" text,
"tests" real,
"england" real,
"west_indies" real,
"draw" real,
"series_result" text,
"holder_at_the_end_of_the_series" text
);
### SQL
Given the database schema, here is the SQL query that answers `When west indes was a holder at the end of the series for the 1991 season with an england greater than 1, what is the smallest west indies?`:
```sql
|
SELECT "date" FROM "game_log" WHERE "record"='27-31'; |
## Task
Generate a SQL query to answer the following question:
`When were the Brewers 27-31?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When were the Brewers 27-31?`:
```sql
|
SELECT "loss" FROM "game_log" WHERE "score"='2-8'; |
## Task
Generate a SQL query to answer the following question:
`When did the Brewers lose 2-8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When did the Brewers lose 2-8?`:
```sql
|
SELECT MIN("attendance") FROM "game_log" WHERE "score"='5-7'; |
## Task
Generate a SQL query to answer the following question:
`When the Brewers score was 5-7, what was the lowest attendance?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `When the Brewers score was 5-7, what was the lowest attendance?`:
```sql
|
SELECT "host_team" FROM "2006_season" WHERE "visiting_team"='baltimore ravens'; |
## Task
Generate a SQL query to answer the following question:
`Who hosted the visiting team Baltimore Ravens?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who hosted the visiting team Baltimore Ravens?`:
```sql
|
SELECT "final_score" FROM "2006_season" WHERE "stadium"='heinz field'; |
## Task
Generate a SQL query to answer the following question:
`What was the final score at Heinz Field?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the final score at Heinz Field?`:
```sql
|
SELECT "stadium" FROM "2006_season" WHERE "host_team"='atlanta falcons'; |
## Task
Generate a SQL query to answer the following question:
`What is the home stadium of the Atlanta Falcons?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the home stadium of the Atlanta Falcons?`:
```sql
|
SELECT "date" FROM "2006_season" WHERE "visiting_team"='new york giants'; |
## Task
Generate a SQL query to answer the following question:
`What date did the New York Giants play as a visiting team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
### SQL
Given the database schema, here is the SQL query that answers `What date did the New York Giants play as a visiting team?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "place"='t1' AND "player"='tim herron'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of Tim Herron, who placed t1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of Tim Herron, who placed t1?`:
```sql
|
SELECT "place" FROM "second_round" WHERE "score"='69-69=138' AND "player"='fred funk'; |
## Task
Generate a SQL query to answer the following question:
`What place does Fred Funk, who has a score of 69-69=138, have?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What place does Fred Funk, who has a score of 69-69=138, have?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "player"='tiger woods'; |
## Task
Generate a SQL query to answer the following question:
`What is Tiger Woods's score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Tiger Woods's score?`:
```sql
|
SELECT "score" FROM "second_round" WHERE "country"='australia'; |
## Task
Generate a SQL query to answer the following question:
`What is the score of Australia?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the score of Australia?`:
```sql
|
SELECT "constructor" FROM "moto_gp_participants" WHERE "rider"='marco melandri'; |
## Task
Generate a SQL query to answer the following question:
`Who was Constructor for rider Marco Melandri?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_participants" (
"team" text,
"constructor" text,
"motorcycle" text,
"tyre" text,
"rider" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was Constructor for rider Marco Melandri?`:
```sql
|
SELECT "motorcycle" FROM "moto_gp_participants" WHERE "rider"='anthony west'; |
## Task
Generate a SQL query to answer the following question:
`Anthony West ride which Motorcyle?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_participants" (
"team" text,
"constructor" text,
"motorcycle" text,
"tyre" text,
"rider" text,
"rounds" text
);
### SQL
Given the database schema, here is the SQL query that answers `Anthony West ride which Motorcyle?`:
```sql
|
SELECT "nhl_team" FROM "round_four" WHERE "nationality"='canada' AND "position"='right wing' AND "pick_num"='43'; |
## Task
Generate a SQL query to answer the following question:
`What team draft a player from Canada that was picked #43 and plays right wing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What team draft a player from Canada that was picked #43 and plays right wing?`:
```sql
|
SELECT "nationality" FROM "round_four" WHERE "player"='gerry methe'; |
## Task
Generate a SQL query to answer the following question:
`What nationality is Gerry Methe?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What nationality is Gerry Methe?`:
```sql
|
SELECT "player" FROM "round_four" WHERE "nationality"='canada' AND "position"='left wing' AND "pick_num"='49'; |
## Task
Generate a SQL query to answer the following question:
`What which player from Canada was picked #49 and plays left wing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What which player from Canada was picked #49 and plays left wing?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.