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