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 \"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: WHAT IS THE AVERAGE OVERALL, FOR MARK FISCHER?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='mark fischer';"
}
] |
[
{
"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: WHAT IS THE SUM OF PICK FOR DAVID TERRELL, WITH A ROUND SMALLER THAN 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='david terrell' AND \"round\"<7;"
}
] |
[
{
"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: WHAT IS THE POSITION WITH A ROUND LARGER THAN 6, AND OVERALL OF 191?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\">6 AND \"overall\"=191;"
}
] |
[
{
"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: Who is the player with a score of 68-71=139?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='68-71=139';"
}
] |
[
{
"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 to par of player jerry pate, who has a 70-69=139 score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='70-69=139' AND \"player\"='jerry pate';"
}
] |
[
{
"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 to par of the player with a t9 place and a score of 72-67=139?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t9' AND \"score\"='72-67=139';"
}
] |
[
{
"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 place of the player witha 69-69=138 score?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='69-69=138';"
}
] |
[
{
"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 team played the Jazz at game 68?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=68;"
}
] |
[
{
"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 date did mehmet okur (24) have the most points?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_points\"='mehmet okur (24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What week had attendance of 64,146?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='64,146';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance of week 12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance from November 3, 1974?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='november 3, 1974';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance of week 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the date of the game on week 9 with attendance greater than 41,863?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'41,863' AND \"week\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_eagles_13_10\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who was the loser against the New York Giants in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"loser\" FROM \"2000s_eagles_13_10\" WHERE \"year\"=2001 AND \"winner\"='new york giants';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_eagles_13_10\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What was the location with the 24-21 result?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"2000s_eagles_13_10\" WHERE \"result\"='24-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_eagles_13_10\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who was the winner with the 24-21 result?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2000s_eagles_13_10\" WHERE \"result\"='24-21';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the average To Par, when Place is \"T3\", and when Player is \"Ben Hogan\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"to_par\") FROM \"second_round\" WHERE \"place\"='t3' AND \"player\"='ben hogan';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the average To Par, when Player is \"Julius Boros\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"to_par\") FROM \"second_round\" WHERE \"player\"='julius boros';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the highest To Par, when Score is \"72-73=145\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"to_par\") FROM \"second_round\" WHERE \"score\"='72-73=145';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is Score, when Place is \"T1\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t1';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is Place, when To Par is \"5\", and when Score is \"72-73=145\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"to_par\"=5 AND \"score\"='72-73=145';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick # after round 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"nfl_draft\" WHERE \"round\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has a pick # 84 in round 3?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"round\"=3 AND \"pick_num\"=84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the pick # for round 11?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"nfl_draft\" WHERE \"round\"=11;"
}
] |
[
{
"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: Which Pick has a Round larger than 8, a Name of kenny fells, and an Overall larger than 297?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"round\">8 AND \"name\"='kenny fells' AND \"overall\">297;"
}
] |
[
{
"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: Which Position has a Round larger than 7, and a Name of wayne asberry?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\">7 AND \"name\"='wayne asberry';"
}
] |
[
{
"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: Which Overall has a Name of markus koch?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='markus koch';"
}
] |
[
{
"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: Which Position has a Round smaller than 8, a Pick of 20, and an Overall smaller than 186?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\"<8 AND \"pick\"=20 AND \"overall\"<186;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score when Fulham is the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round_proper\" WHERE \"away_team\"='fulham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which away team has a tie number of 14?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"third_round_proper\" WHERE \"tie_no\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the tie number in the game on 5 January 1986 where Exeter City is the away team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"date\"='5 january 1986' AND \"away_team\"='exeter city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: What is the total average for McCain% of 55.0% and Obama# higher than 3,487?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"by_county\" WHERE \"mc_cainpct\"='55.0%' AND \"obamanum\">'3,487';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"2013\" text\n);\n\nQuestion: what is 2010 when 2009 is w and 2007 is qf?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2009\"='w' AND \"2007\"='qf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"2013\" text\n);\n\nQuestion: what is 2000 when 2012 is 4r?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2012\"='4r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"2013\" text\n);\n\nQuestion: what is 2000 when 2012 is w and 2011 is 4r?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2012\"='w' AND \"2011\"='4r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"2013\" text\n);\n\nQuestion: what is 2010 when 2006 is 3r?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2006\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"2013\" text\n);\n\nQuestion: what is 2013 when 2001 is qf and 2011 is 4r?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2001\"='qf' AND \"2011\"='4r';"
}
] |
[
{
"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);\n\nQuestion: What is the average round for the record of 1-1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-1';"
}
] |
[
{
"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);\n\nQuestion: What method had a record 12-2-3?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='12-2-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"townships\" (\n \"name\" text,\n \"chinese\" text,\n \"hanyu_pinyin\" text,\n \"wade_giles\" text,\n \"hokkien_pe_h_e_j\" text,\n \"english_meaning\" text\n);\n\nQuestion: What Hanyu Pinyin is in the Jinning Township?"
},
{
"role": "assistant",
"content": "SELECT \"hanyu_pinyin\" FROM \"townships\" WHERE \"name\"='jinning township';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"scored\" real,\n \"competition\" text\n);\n\nQuestion: How many times did Sham Kwok Fai score in the game that was played on 22 February 2006?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"scored\") FROM \"international_career\" WHERE \"date\"='22 february 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: The home team york city has what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"home_team\"='york city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the total number of Week(s), when Attendance is 61,603?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='61,603';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is Opponent, when Attendance is 62,170?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='62,170';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: HOW MANY POINTS DOES ALEX SPERAFICO HAVE WITH A GRID LARGER THAN 17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"race\" WHERE \"driver\"='alex sperafico' AND \"grid\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: WHAT ARE THE LAPS WITH POINTS LARGER THAN 5, WITH FORSYTHE RACING, AND GRID 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"points\">5 AND \"team\"='forsythe racing' AND \"grid\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: WHAT IS THE SCORE WHEN THE COMPETITION WAS 1978 world cup qualification?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='1978 world cup qualification';"
}
] |
[
{
"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: What is the average pick number for jerry hackenbruck who was overall pick less than 282?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='jerry hackenbruck' AND \"overall\"<282;"
}
] |
[
{
"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: What is the lowest draft pick number for mark doak who had an overall pick smaller than 147?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='mark doak' AND \"overall\"<147;"
}
] |
[
{
"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: What position did the player have who was from the college of california?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"college\"='california';"
}
] |
[
{
"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: What college did jerry hackenbruck come from who had an overall pick less than 344?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"<344 AND \"name\"='jerry hackenbruck';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What team was the opponent on 03/18/08?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"21st_century_comeback\" WHERE \"date\"='03/18/08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What is the site where the game was held in the city of Delaware?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"21st_century_comeback\" WHERE \"city\"='delaware';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What city was the game held in when the opponent was Towson?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"21st_century_comeback\" WHERE \"opponent\"='towson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What team was opponen in baltimore, at 2:00pm, on 4/06/08?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"21st_century_comeback\" WHERE \"city\"='baltimore' AND \"time\"='2:00pm' AND \"date\"='4/06/08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What date was the game held at UMBC Field?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"21st_century_comeback\" WHERE \"site\"='umbc field';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century_comeback\" (\n \"date\" text,\n \"time\" text,\n \"opponent\" text,\n \"site\" text,\n \"city\" text\n);\n\nQuestion: What date was the game held in Towson?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"21st_century_comeback\" WHERE \"city\"='towson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_5\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"episodes\" real,\n \"specials\" real\n);\n\nQuestion: Which season premiered on 29 October 1990 and had more than 6 episodes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"series\") FROM \"series_1_5\" WHERE \"premiere\"='29 october 1990' AND \"episodes\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: WHAT DATE HAD A SCORE OF 71-64?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"score\"='71-64';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: WHAT SCORE WAS ON SEPTEMBER 21?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"date\"='september 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: WHAT SCORE HAD A RECORD OF 1-1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"record\"='1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: WHAT OPPONENT HAD A DATE OF SEPTEMBER 28?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"date\"='september 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: WHAT SCORE HAD A LOSS AND RECORD OF 1-1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"result\"='loss' AND \"record\"='1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_ice_officials\" (\n \"season\" text,\n \"coach\" text,\n \"captain\" text,\n \"alternate_1\" text,\n \"alternate_2\" text\n);\n\nQuestion: Who is the alternate for Andy Brown, and Nick Grady?"
},
{
"role": "assistant",
"content": "SELECT \"alternate_2\" FROM \"on_ice_officials\" WHERE \"coach\"='andy brown' AND \"captain\"='nick grady';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_ice_officials\" (\n \"season\" text,\n \"coach\" text,\n \"captain\" text,\n \"alternate_1\" text,\n \"alternate_2\" text\n);\n\nQuestion: Which captain has Gintare Karpaviciute as an alternate?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"on_ice_officials\" WHERE \"alternate_1\"='gintare karpaviciute';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_ice_officials\" (\n \"season\" text,\n \"coach\" text,\n \"captain\" text,\n \"alternate_1\" text,\n \"alternate_2\" text\n);\n\nQuestion: Which coach works with Robert Harvey?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"on_ice_officials\" WHERE \"captain\"='robert harvey';"
}
] |
[
{
"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: Which Nickname has Founded of 1954?"
},
{
"role": "assistant",
"content": "SELECT \"nickname\" FROM \"2013_2014_teams\" WHERE \"founded\"=1954;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: Which team played in the Boston Garden when the final score was L 118-130?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"location_attendance\"='boston garden' AND \"score\"='l 118-130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What team played at the Boston Garden when the series was 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"location_attendance\"='boston garden' AND \"series\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" text\n);\n\nQuestion: Which driver had a grid of 2?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" text\n);\n\nQuestion: What is the smallest grid value that had 16 points and a team of Mi-Jack Conquest Racing?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"team\"='mi-jack conquest racing' AND \"points\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" text\n);\n\nQuestion: What is the number of points associated with 165 laps?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race\" WHERE \"laps\"=165;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" text\n);\n\nQuestion: What is the total number of laps associated with 8 points and a grid under 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"points\"='8' AND \"grid\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"rank\" real,\n \"rank_fortune_500\" real,\n \"name\" text,\n \"headquarters\" text,\n \"revenue_millions\" real,\n \"profit_millions\" real,\n \"employees\" real,\n \"industry\" text\n);\n\nQuestion: What is the highest amount of employees with 110,520.2 in revenue, and a more than 2,237.7 profit?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"employees\") FROM \"list\" WHERE \"revenue_millions\"<'110,520.2' AND \"profit_millions\">'2,237.7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_beverly_perdue\" text,\n \"republican_pat_mc_crory\" text,\n \"libertarian_michael_munger\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the % for Munger when McCrory has 40% and the lead margin is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT \"libertarian_michael_munger\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_pat_mc_crory\"='40%' AND \"lead_margin\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_beverly_perdue\" text,\n \"republican_pat_mc_crory\" text,\n \"libertarian_michael_munger\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the percentage of Perdue when McCrory has 37% and Munger has 6%?"
},
{
"role": "assistant",
"content": "SELECT \"democrat_beverly_perdue\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_pat_mc_crory\"='37%' AND \"libertarian_michael_munger\"='6%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_beverly_perdue\" text,\n \"republican_pat_mc_crory\" text,\n \"libertarian_michael_munger\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the lead margin for McCrory when he has 49%?"
},
{
"role": "assistant",
"content": "SELECT \"lead_margin\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_pat_mc_crory\"='49%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"location\" text,\n \"year_built\" real\n);\n\nQuestion: What is the lowest height in feet for the building located in platz der einheit 1, gallus, that was built after 1961 with a height less than 130 meters?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height_ft\") FROM \"tallest_completed_buildings\" WHERE \"year_built\">1961 AND \"location\"='platz der einheit 1, gallus' AND \"height_m\"<130;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"location\" text,\n \"year_built\" real\n);\n\nQuestion: What is the sum of the heights in meters for the commerzbank tower built after 1984?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"height_m\") FROM \"tallest_completed_buildings\" WHERE \"year_built\">1984 AND \"name\"='commerzbank tower';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"location\" text,\n \"year_built\" real\n);\n\nQuestion: What is the earliest year that the building in sonnemannstra\u00dfe/r\u00fcckertstra\u00dfe, ostend was built with a height larger than 185 meters?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year_built\") FROM \"tallest_completed_buildings\" WHERE \"location\"='sonnemannstra\u00dfe/r\u00fcckertstra\u00dfe, ostend' AND \"height_m\">185;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"location\" text,\n \"year_built\" real\n);\n\nQuestion: What is the lowest height in meters for the building located in mail\u00e4nder stra\u00dfe 1, sachsenhausen-s\u00fcd, with a height shorter than 328.1 ft?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height_m\") FROM \"tallest_completed_buildings\" WHERE \"location\"='mail\u00e4nder stra\u00dfe 1, sachsenhausen-s\u00fcd' AND \"height_ft\"<328.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the average population vlue for an area smaller than 26.69 square km and has an official name of Rogersville?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"communities\" WHERE \"area_km_2\"<26.69 AND \"official_name\"='rogersville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"release_type\" text,\n \"label\" text,\n \"hungarian_top_40_album_charts\" text\n);\n\nQuestion: What's the name of the album from 2012 with a Hammer Music / Nail Records label?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"discography\" WHERE \"label\"='hammer music / nail records' AND \"year\"=2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"release_type\" text,\n \"label\" text,\n \"hungarian_top_40_album_charts\" text\n);\n\nQuestion: What year had the Hungarian top 40 album charts of 3?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"discography\" WHERE \"hungarian_top_40_album_charts\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"release_type\" text,\n \"label\" text,\n \"hungarian_top_40_album_charts\" text\n);\n\nQuestion: What type of release was Napisten Hava?"
},
{
"role": "assistant",
"content": "SELECT \"release_type\" FROM \"discography\" WHERE \"album\"='napisten hava';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"release_type\" text,\n \"label\" text,\n \"hungarian_top_40_album_charts\" text\n);\n\nQuestion: What was the name of the album that was a demo release?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"discography\" WHERE \"release_type\"='demo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973_to_1983\" (\n \"issued\" text,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What is the serials issued in 1982 with a format of ABC-123?"
},
{
"role": "assistant",
"content": "SELECT \"serials_issued\" FROM \"1973_to_1983\" WHERE \"serial_format\"='abc-123' AND \"issued\"='1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973_to_1983\" (\n \"issued\" text,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: Which design has a serial format of AB-12-34?"
},
{
"role": "assistant",
"content": "SELECT \"design\" FROM \"1973_to_1983\" WHERE \"serial_format\"='ab-12-34';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973_to_1983\" (\n \"issued\" text,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: Which serials were issued with a design of black on yellow?"
},
{
"role": "assistant",
"content": "SELECT \"serials_issued\" FROM \"1973_to_1983\" WHERE \"design\"='black on yellow';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: WHo was the outgoing manager for the team of fc carl zeiss jena?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"team\"='fc carl zeiss jena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What team did the manager come from who departed due to an end of tenure as caretaker?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='end of tenure as caretaker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the date of appointment for the replaced manager, reiner geyer?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"replaced_by\"='reiner geyer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the date of vacancy after the outgoing manager, ralf santelli departed?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='ralf santelli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Who was the outgoing manager who departed due to fc energie cottbus purchased rights?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='fc energie cottbus purchased rights';"
}
] |
[
{
"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: How many times is the position lb and the overall is less than 46?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='lb' AND \"overall\"<46;"
}
] |
[
{
"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: what is the college when the overall is more than 76 for brian mitchell?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"overall\">76 AND \"name\"='brian mitchell';"
}
] |
[
{
"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: what is the pick when the overall is less than 297 and the college is alabama?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"<297 AND \"college\"='alabama';"
}
] |
[
{
"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: what is the highest round when the college is penn state?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='penn state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"changes_in_poverty_rates_on_largest_rese\" (\n \"reservation\" text,\n \"location\" text,\n \"1969\" real,\n \"1979\" real,\n \"1989\" real,\n \"2000\" real\n);\n\nQuestion: What is the 1989 number when the 200 number is less than 52.8 in Arizona, New Mexico, and Utah"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1989\") FROM \"changes_in_poverty_rates_on_largest_rese\" WHERE \"2000\"<52.8 AND \"location\"='arizona, new mexico, and utah';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.