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 \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid average with a +1 lap time and more than 27 laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='+1 lap' AND \"laps\">27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which lap has more than 17 grids with tetsuya harada?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"moto_gp_classification\" WHERE \"grid\">17 AND \"rider\"='tetsuya harada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year\" real,\n \"english_title\" text,\n \"danish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Prior to 1978, what is the Danish of the Film directed by Bent Christensen?"
},
{
"role": "assistant",
"content": "SELECT \"danish_title\" FROM \"submissions\" WHERE \"year\"<1978 AND \"director\"='bent christensen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year\" real,\n \"english_title\" text,\n \"danish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Who is the Director of the Olsen Gang Sees Red?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"english_title\"='the olsen gang sees red';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year\" real,\n \"english_title\" text,\n \"danish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the submission Year of the Film The Dark Side of the Moon directed by Erik Clausen?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"submissions\" WHERE \"director\"='erik clausen' AND \"english_title\"='the dark side of the moon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year\" real,\n \"english_title\" text,\n \"danish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Year of submission of the Film The Art of Crying?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"submissions\" WHERE \"english_title\"='the art of crying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: Which Home Town had the weight of 201?"
},
{
"role": "assistant",
"content": "SELECT \"home_town\" FROM \"roster\" WHERE \"weight\"=201;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What Position did the sophomore Darnell Jackson play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"roster\" WHERE \"year\"='sophomore' AND \"name\"='darnell jackson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: what kind of 2007 has a 1999 of \u2014, and a Model of seat mii?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"sales_and_production_figures\" WHERE \"1999\"='\u2014' AND \"model\"='seat mii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which 2005 has a 2006 of 126,511?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"sales_and_production_figures\" WHERE \"2006\"='126,511';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2004 which has a 2003 of 36,026?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"sales_and_production_figures\" WHERE \"2003\"='36,026';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2007 which has a 2011 of 191,183? Question 4"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"sales_and_production_figures\" WHERE \"2011\"='191,183';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2011 which has a 2002 of \u2014, and a Model of seat marbella?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"sales_and_production_figures\" WHERE \"2002\"='\u2014' AND \"model\"='seat marbella';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sales_and_production_figures\" (\n \"model\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Name the 2003 which has a 2000 of \u2014, and a 2007 of \u2014, and a 2010 of \u2014?"
},
{
"role": "assistant",
"content": "SELECT \"2003\" FROM \"sales_and_production_figures\" WHERE \"2000\"='\u2014' AND \"2007\"='\u2014' AND \"2010\"='\u2014';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_2014_teams\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: Who is affiliated with the Dukes?"
},
{
"role": "assistant",
"content": "SELECT \"affiliation\" FROM \"2013_2014_teams\" WHERE \"nickname\"='dukes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_2014_teams\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: What school is in Radford, Va?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2013_2014_teams\" WHERE \"location\"='radford, va';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_2014_teams\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: What school has a public nickname, founded after 1838 in Harrisonburg, Va?"
},
{
"role": "assistant",
"content": "SELECT \"nickname\" FROM \"2013_2014_teams\" WHERE \"affiliation\"='public' AND \"founded\">1838 AND \"location\"='harrisonburg, va';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Lowest pick for mike flater?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='mike flater';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who was the home team on January 2 with 23 points?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"points\"=23 AND \"date\"='january 2';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record when St. Louis is the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"visitor\"='st. louis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game on November 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='november 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What were the location and attendance for the game against New Jersey?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='new jersey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Where were the 2009 and 2011 Grand Slam Tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"doubles_performance_timeline\" WHERE \"2009\"='grand slam tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Second Vice President, when Third Vice President is \"Gen. Juan Alonso\", and when Inaugurated is \"15 March 1940\"?"
},
{
"role": "assistant",
"content": "SELECT \"second_vice_president\" FROM \"1928_1944\" WHERE \"third_vice_president\"='gen. juan alonso' AND \"inaugurated\"='15 march 1940';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Left Office, when Inaugurate is \"15 March 1930\"?"
},
{
"role": "assistant",
"content": "SELECT \"left_office\" FROM \"1928_1944\" WHERE \"inaugurated\"='15 march 1930';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Second Vice President, when Inaugurated is \"26 March 1928\"?"
},
{
"role": "assistant",
"content": "SELECT \"second_vice_president\" FROM \"1928_1944\" WHERE \"inaugurated\"='26 march 1928';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Second Vice President, when Inaugurated is \"15 March 1935\"?"
},
{
"role": "assistant",
"content": "SELECT \"second_vice_president\" FROM \"1928_1944\" WHERE \"inaugurated\"='15 march 1935';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Third Vice President, when Inaugurated is \"15 March 1934\"?"
},
{
"role": "assistant",
"content": "SELECT \"third_vice_president\" FROM \"1928_1944\" WHERE \"inaugurated\"='15 march 1934';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_1944\" (\n \"first_vice_president\" text,\n \"second_vice_president\" text,\n \"third_vice_president\" text,\n \"inaugurated\" text,\n \"left_office\" text\n);\n\nQuestion: What is Third Vice President, when Second Vice President is \"Baudelio Palma\"?"
},
{
"role": "assistant",
"content": "SELECT \"third_vice_president\" FROM \"1928_1944\" WHERE \"second_vice_president\"='baudelio palma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game from July 18?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='july 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Attendance on Week 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"regular_season\" WHERE \"week\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Opponent of the game with a Result of w 13\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"result\"='w 13\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the score in January that was less than 4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"january\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_wins_11\" (\n \"date\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which date was the event that Yani won in a playoff over Yueh-Chyn Huang?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"other_wins_11\" WHERE \"margin_of_victory\"='playoff' AND \"runner_s_up\"='yueh-chyn huang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"faculae\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter\" real,\n \"year_named\" real\n);\n\nQuestion: What is the latitude of the point with a longitude of 147.1w?"
},
{
"role": "assistant",
"content": "SELECT \"latitude\" FROM \"faculae\" WHERE \"longitude\"='147.1w';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is ISBN UK, when Author is \"Dave Martin\", and when ISBN US is \"N/A\"?"
},
{
"role": "assistant",
"content": "SELECT \"isbn_uk\" FROM \"game_books\" WHERE \"author\"='dave martin' AND \"isbn_us\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is ISBN US, when Title is \"Crisis In Space\"?"
},
{
"role": "assistant",
"content": "SELECT \"isbn_us\" FROM \"game_books\" WHERE \"title\"='crisis in space';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is Author, when TV Companions Featured is \"Peri Brown\", and when Title is \"Race Against Time\"?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"game_books\" WHERE \"tv_companions_featured\"='peri brown' AND \"title\"='race against time';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is Title, when TV Companions Featured is \"K-9\"?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"game_books\" WHERE \"tv_companions_featured\"='k-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is ISBN US, when Title is \"Mission To Venus\"?"
},
{
"role": "assistant",
"content": "SELECT \"isbn_us\" FROM \"game_books\" WHERE \"title\"='mission to venus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_books\" (\n \"title\" text,\n \"author\" text,\n \"isbn_uk\" text,\n \"isbn_us\" text,\n \"tv_companions_featured\" text\n);\n\nQuestion: What is TV Companions Featured, when Author is \"William Emms\"?"
},
{
"role": "assistant",
"content": "SELECT \"tv_companions_featured\" FROM \"game_books\" WHERE \"author\"='william emms';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_champions_league\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has a Result of 2\u20132, and a Venue of H?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"uefa_champions_league\" WHERE \"result\"='2\u20132' AND \"venue\"='h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: Which player had a to par score larger than 7 and a total score of 298?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\">7 AND \"total\"=298;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: In which location did he win the Superbrawl 16 event?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"event\"='superbrawl 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was his record when the method was technical submission (forearm choke)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='technical submission (forearm choke)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent in round 2 of the UFC 49 event?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='2' AND \"event\"='ufc 49';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the round when he fought Joe Stevenson?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='joe stevenson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On which date was the score 94-74 w?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='94-74 w';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When they played at Chicago Bulls, what was the Location/Attendance?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"opponent\"='at chicago bulls';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent in Game 44?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\"='44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent when they played at Delta Center with a record of 27-13?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='delta center' AND \"record\"='27-13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date for Game 41?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"='41';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"round\" text\n);\n\nQuestion: Which Opposing Team has an Against of 3, and a Date of 11 february 1950?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_team\" FROM \"fa_cup\" WHERE \"against\"=3 AND \"date\"='11 february 1950';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"round\" text\n);\n\nQuestion: Which Venue has an Opposing Team of manchester united, and a Round of 5th round replay?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"fa_cup\" WHERE \"opposing_team\"='manchester united' AND \"round\"='5th round replay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"round\" text\n);\n\nQuestion: Which Against has a Date of 28 january 1950?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"fa_cup\" WHERE \"date\"='28 january 1950';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the total number of years wehre anna thompson had a 3rd place result at edinburgh, scotland?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"result\"='3rd' AND \"venue\"='edinburgh, scotland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What year did anna thompson have a 7th place result?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"result\"='7th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the average year that anna thompson had an 8th place result in team competition at the world cross country championships in st etienne, france with"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"tournament\"='world cross country championships' AND \"venue\"='st etienne, france' AND \"extra\"='team competition' AND \"result\"='8th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"solheim_cup_record\" (\n \"year\" text,\n \"total_matches\" real,\n \"total_w_l_h\" text,\n \"singles_w_l_h\" text,\n \"fourballs_w_l_h\" text,\n \"points_won\" real,\n \"points_pct\" real\n);\n\nQuestion: What is the total matches in 2002 where points won is larger than 1.5 and the points % is smaller than 50?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_matches\") FROM \"solheim_cup_record\" WHERE \"points_won\">1.5 AND \"year\"='2002' AND \"points_pct\"<50;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: WHAT IS THE LOSS WITH AN AVERAGE OF 89.9?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"loss\") FROM \"rushing\" WHERE \"avg_g\"=89.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: WHAT IS THE NUMBER OF LOSSES WITH A LONG SMALLER THAN 24, AND GAIN BIGGER THAN 116?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"loss\") FROM \"rushing\" WHERE \"long\"<24 AND \"gain\">116;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How many rounds did Brett go against Kevin Asplund?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='kevin asplund';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How many rounds did Brett go for the Strikeforce: Shamrock vs. Diaz match?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='strikeforce: shamrock vs. diaz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"rank\" text,\n \"july_1_2013_projection\" real,\n \"pct_of_pop\" real,\n \"average_relative_annual_growth_pct\" real,\n \"average_absolute_annual_growth\" real\n);\n\nQuestion: What is the Average relative annual growth (%) for the country that ranks 41 and has a July 1, 2013 projection larger than 2,204,000?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average_relative_annual_growth_pct\") FROM \"table\" WHERE \"rank\"='41' AND \"july_1_2013_projection\">'2,204,000';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Opponent has a Record of 22-10?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='22-10';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Score has an Opponent of @ seattle?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='@ seattle';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Result of loss, and an Opponent of @ la clippers?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"result\"='loss' AND \"opponent\"='@ la clippers';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Score has an Opponent of @ la lakers, and a Record of 8-6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='@ la lakers' AND \"record\"='8-6';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Opponent has a Result of win, and a Date of march 17?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"result\"='win' AND \"date\"='march 17';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text\n);\n\nQuestion: Which Score has a Date of may 4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='may 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_nbl_ladder_championship_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"loss\" real,\n \"last_5\" text,\n \"streak\" text,\n \"pf_per_game\" real,\n \"pa_per_game\" real,\n \"pd_per_game\" real,\n \"winning_pct\" text\n);\n\nQuestion: Which PD per game has a Rank smaller than 4, a Winning % of 78.6%, a Streak of w1, and a PA per game smaller than 81.5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pd_per_game\") FROM \"2009_nbl_ladder_championship_round\" WHERE \"rank\"<4 AND \"winning_pct\"='78.6%' AND \"streak\"='w1' AND \"pa_per_game\"<81.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_nbl_ladder_championship_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"loss\" real,\n \"last_5\" text,\n \"streak\" text,\n \"pf_per_game\" real,\n \"pa_per_game\" real,\n \"pd_per_game\" real,\n \"winning_pct\" text\n);\n\nQuestion: Which Loss has a Last 5 of 4-1, a Streak of w2, and a PA per game smaller than 88.43?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"loss\") FROM \"2009_nbl_ladder_championship_round\" WHERE \"last_5\"='4-1' AND \"streak\"='w2' AND \"pa_per_game\"<88.43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_nbl_ladder_championship_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"loss\" real,\n \"last_5\" text,\n \"streak\" text,\n \"pf_per_game\" real,\n \"pa_per_game\" real,\n \"pd_per_game\" real,\n \"winning_pct\" text\n);\n\nQuestion: Which Last 5 has a Rank of 7?"
},
{
"role": "assistant",
"content": "SELECT \"last_5\" FROM \"2009_nbl_ladder_championship_round\" WHERE \"rank\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_nbl_ladder_championship_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"loss\" real,\n \"last_5\" text,\n \"streak\" text,\n \"pf_per_game\" real,\n \"pa_per_game\" real,\n \"pd_per_game\" real,\n \"winning_pct\" text\n);\n\nQuestion: Which Played has a PD per game larger than 6.28, and a Loss smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"2009_nbl_ladder_championship_round\" WHERE \"pd_per_game\">6.28 AND \"loss\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_nbl_ladder_championship_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"loss\" real,\n \"last_5\" text,\n \"streak\" text,\n \"pf_per_game\" real,\n \"pa_per_game\" real,\n \"pd_per_game\" real,\n \"winning_pct\" text\n);\n\nQuestion: Which PF per game has a Rank of 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pf_per_game\") FROM \"2009_nbl_ladder_championship_round\" WHERE \"rank\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the score in Round 3?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the record for opponent Matt Serra?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='matt serra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: What was the event for round 1 against Lance Wipf?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"opponent\"='lance wipf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"political_subdivision\" (\n \"barangay\" text,\n \"area_km\" real,\n \"population_2007\" real,\n \"population_2010\" real,\n \"pop_density_per_km\" real\n);\n\nQuestion: What is the total number of Area (km\u00b2), when Population (2007) is 6,176?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"area_km\") FROM \"political_subdivision\" WHERE \"population_2007\"='6,176';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"political_subdivision\" (\n \"barangay\" text,\n \"area_km\" real,\n \"population_2007\" real,\n \"population_2010\" real,\n \"pop_density_per_km\" real\n);\n\nQuestion: What is the average Population (2010), when Population (2007) is 4,875, and when Area (km\u00b2) is greater than 1.456?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population_2010\") FROM \"political_subdivision\" WHERE \"population_2007\"='4,875' AND \"area_km\">1.456;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many laps did car 23 do?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"classification\" WHERE \"car_no\"='23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many laps did the car do that had a final position of 17?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"classification\" WHERE \"fin_pos\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What grid did the team racing professionals race on?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"classification\" WHERE \"team\"='racing professionals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What car number had a race time of +0.3844?"
},
{
"role": "assistant",
"content": "SELECT \"car_no\" FROM \"classification\" WHERE \"time_retired\"='+0.3844';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many points were scored by car number 10 that ended with a collision?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"classification\" WHERE \"time_retired\"='collision' AND \"car_no\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Who was the driver who had a final position of 14?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"fin_pos\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the money ($) for player justin leonard?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"player\"='justin leonard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the place when the score is 76-69-71-70=286?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"score\"='76-69-71-70=286';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the place for costantino rocca?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"player\"='costantino rocca';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: what is the highest money ($) for bernhard langer?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"money\") FROM \"final_leaderboard\" WHERE \"player\"='bernhard langer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the score of the FIFA report on October 13, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"men_s_national_team\" WHERE \"report\"='fifa' AND \"date\"='october 13, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What venue has a EAFF report on June 24, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"men_s_national_team\" WHERE \"report\"='eaff' AND \"date\"='june 24, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the venue on October 13, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"men_s_national_team\" WHERE \"date\"='october 13, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: At what Site was the Result W13-7?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"schedule\" WHERE \"result\"='w13-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Attendance on 11/09/1946?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='11/09/1946';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Site had an Attendance of 45,000?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"schedule\" WHERE \"attendance\"='45,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Result on 11/02/1946?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='11/02/1946';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"60_metres\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real,\n \"points\" real\n);\n\nQuestion: What mark has over 813 points in the United States, and a 0.152 react?"
},
{
"role": "assistant",
"content": "SELECT \"mark\" FROM \"60_metres\" WHERE \"points\">813 AND \"country\"='united states' AND \"react\">0.152;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the lowest Total, when Year(s) Won is \"1968 , 1971\", and when To Par is less than 11?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"missed_the_cut\" WHERE \"year_s_won\"='1968 , 1971' AND \"to_par\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the lowest To Par, when Player is \"Johnny Miller\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"to_par\") FROM \"missed_the_cut\" WHERE \"player\"='johnny miller';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.