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 \"finals_14_9_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match against Nguyen Tien Minh in the Bulgaria Open?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"finals_14_9_titles_5_runners_up\" WHERE \"opponent\"='nguyen tien minh' AND \"tournament\"='bulgaria open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score when the New York Jets were the Visiting Team?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"1989\" WHERE \"visiting_team\"='new york jets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: When were the Cleveland Browns the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1989\" WHERE \"visiting_team\"='cleveland browns';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Where were the New York Jets visiting?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"1989\" WHERE \"visiting_team\"='new york jets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score in Robert F. Kennedy Memorial Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"1989\" WHERE \"stadium\"='robert f. kennedy memorial stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the visiting team on November 12?"
},
{
"role": "assistant",
"content": "SELECT \"visiting_team\" FROM \"1989\" WHERE \"date\"='november 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: In what stadium were the New England Patriots the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"1989\" WHERE \"visiting_team\"='new england patriots';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: If the games played are smaller than 18, what are the lowest goals conceded?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_conceded\") FROM \"league_standings\" WHERE \"played\"<18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: If the place is smaller than 8 and they played more than 18, what is the total number of goals conceded?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_conceded\") FROM \"league_standings\" WHERE \"place\"<8 AND \"played\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of the place that has less than 2 losses?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"place\") FROM \"league_standings\" WHERE \"lost\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"epic_m_and_epic_x\" (\n \"frame_size\" text,\n \"width\" real,\n \"height\" real,\n \"mpix\" real,\n \"aspect_ratio\" text,\n \"max_fps\" real,\n \"max_fps_hd_rx\" real,\n \"lowest_possible_redcode_at_24_fps\" text,\n \"lowest_possible_redcode_at_max_fps\" text\n);\n\nQuestion: What is the aspect ration when the max fps HDRx is 80?"
},
{
"role": "assistant",
"content": "SELECT \"aspect_ratio\" FROM \"epic_m_and_epic_x\" WHERE \"max_fps_hd_rx\"=80;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"epic_m_and_epic_x\" (\n \"frame_size\" text,\n \"width\" real,\n \"height\" real,\n \"mpix\" real,\n \"aspect_ratio\" text,\n \"max_fps\" real,\n \"max_fps_hd_rx\" real,\n \"lowest_possible_redcode_at_24_fps\" text,\n \"lowest_possible_redcode_at_max_fps\" text\n);\n\nQuestion: What is the smallest width for a frame size of 5k and a height shorter than 2700?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"width\") FROM \"epic_m_and_epic_x\" WHERE \"frame_size\"='5k' AND \"height\"<2700;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"august\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the opponent on August 29?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"august\" WHERE \"date\"='august 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"august\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: Which team had the attendance of 16,468 and lost?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"august\" WHERE \"attendance\"='16,468';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"august\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What opponent has a loss of Trachsel (10-11)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"august\" WHERE \"loss\"='trachsel (10-11)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"august\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance on August 8?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"august\" WHERE \"date\"='august 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"rapid\" text,\n \"location\" text\n);\n\nQuestion: Which rapid has a distance in km smaller than 14.2, and a Station of k\u014dmy\u014dji?"
},
{
"role": "assistant",
"content": "SELECT \"rapid\" FROM \"stations\" WHERE \"distance_km\"<14.2 AND \"station\"='k\u014dmy\u014dji';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Other, when the Name is Simon Gillett Category:Articles with hCards, and when the Total is less than 34?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"other\") FROM \"appearances\" WHERE \"name\"='simon gillett category:articles with hcards' AND \"total\"<34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the value \"League Cup\", when the Total is less than 1, and when the League is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_cup\") FROM \"appearances\" WHERE \"total\"<1 AND \"league\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the greatest Total, when the FA Cup is 0, when the Name is Robbie Williams Category:Articles with hCards, and when the League Cup is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"appearances\" WHERE \"fa_cup\"=0 AND \"name\"='robbie williams category:articles with hcards' AND \"league_cup\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the average Total, when the Name is Simon Gillett Category:Articles with hCards, and when the Other is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"appearances\" WHERE \"name\"='simon gillett category:articles with hcards' AND \"other\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of League Cup, when the Other is less than 1, when the Name is Gareth Farrelly Category:Articles with hCards, and when the League is greater than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_cup\") FROM \"appearances\" WHERE \"other\"<1 AND \"name\"='gareth farrelly category:articles with hcards' AND \"league\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"location\" text\n);\n\nQuestion: Name the runner-up which has 3rd place of terry hollands"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"list_of_champions\" WHERE \"3rd_place\"='terry hollands';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"location\" text\n);\n\nQuestion: Name the champion for christopher miles runner-up"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"list_of_champions\" WHERE \"runner_up\"='christopher miles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"location\" text\n);\n\nQuestion: Name the champion for 2000"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"list_of_champions\" WHERE \"year\"='2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"location\" text\n);\n\nQuestion: Name the champion for 3rd place tbc and runner-up tbc"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"list_of_champions\" WHERE \"3rd_place\"='tbc' AND \"runner_up\"='tbc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"location\" text\n);\n\nQuestion: Name the location for 1998"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"list_of_champions\" WHERE \"year\"='1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals correspond with a total over 4?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"total\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of gold medals with a total of 12 medals and less than 4 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"total\"=12 AND \"bronze\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest number of gold medals corresponding to the total rank with more than 4 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"rank\"='total' AND \"bronze\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest number of bronze medals with more than 4 gold medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"gold\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: The candidate with Riding of st. john's south\u2014mount pearl is what gender?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"7_seats\" WHERE \"riding\"='st. john''s south\u2014mount pearl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is the rank of walter noel from st. john's?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"7_seats\" WHERE \"residence\"='st. john''s' AND \"candidate_s_name\"='walter noel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is the name of the candidate from happy valley-goose bay with a gender of m?"
},
{
"role": "assistant",
"content": "SELECT \"candidate_s_name\" FROM \"7_seats\" WHERE \"gender\"='m' AND \"residence\"='happy valley-goose bay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which number has a 0.35 percentage?"
},
{
"role": "assistant",
"content": "SELECT \"number\" FROM \"language\" WHERE \"percentage_pct\"='0.35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What is the percentage for Russian?"
},
{
"role": "assistant",
"content": "SELECT \"percentage_pct\" FROM \"language\" WHERE \"language\"='russian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: How many males speak Russian?"
},
{
"role": "assistant",
"content": "SELECT \"males\" FROM \"language\" WHERE \"language\"='russian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"award\" text\n);\n\nQuestion: Who is the writer for Red Rose Chain LTD?"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"2007\" WHERE \"recipient\"='red rose chain ltd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"award\" text\n);\n\nQuestion: Which producer did Daniel Cormack direct?"
},
{
"role": "assistant",
"content": "SELECT \"producer_s\" FROM \"2007\" WHERE \"director_s\"='daniel cormack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"award\" text\n);\n\nQuestion: Who produced Laura Tunstall?"
},
{
"role": "assistant",
"content": "SELECT \"producer_s\" FROM \"2007\" WHERE \"recipient\"='laura tunstall';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"award\" text\n);\n\nQuestion: Who wrote the film Jehovah's Witness?"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"2007\" WHERE \"film\"='jehovah''s witness';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: When did Hein Vergeer have a distance of 5,000m?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"personal_records\" WHERE \"distance\"='5,000m';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What were the notes during the distance of Men's Speed Skating?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"personal_records\" WHERE \"distance\"='men''s speed skating';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date has the competition of uefa euro 2012 qualifying?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='uefa euro 2012 qualifying';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"step_races\" (\n \"race_name\" real,\n \"grade\" text,\n \"racecourse\" text,\n \"distance\" text,\n \"priority_entry_rights_to_derby\" text\n);\n\nQuestion: What is the Grade that has Turf 1600m?"
},
{
"role": "assistant",
"content": "SELECT \"grade\" FROM \"step_races\" WHERE \"priority_entry_rights_to_derby\"='turf 1600m';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"step_races\" (\n \"race_name\" real,\n \"grade\" text,\n \"racecourse\" text,\n \"distance\" text,\n \"priority_entry_rights_to_derby\" text\n);\n\nQuestion: What is the Priority-entry-rights to Derby in rank 4?"
},
{
"role": "assistant",
"content": "SELECT \"priority_entry_rights_to_derby\" FROM \"step_races\" WHERE \"race_name\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"installation\" text,\n \"cluj\" real,\n \"oradea\" real,\n \"baia_mare\" real,\n \"bistrita\" real,\n \"satu_mare\" real,\n \"zalau\" real,\n \"electrica_north_transylvania\" real\n);\n\nQuestion: How many Baia Mare have an Electrica North Transylvania under 14.476, Bistrita of 643, and Zalau under 737?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"baia_mare\") FROM \"distribution\" WHERE \"electrica_north_transylvania\"<14.476 AND \"bistrita\"=643 AND \"zalau\"<737;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"installation\" text,\n \"cluj\" real,\n \"oradea\" real,\n \"baia_mare\" real,\n \"bistrita\" real,\n \"satu_mare\" real,\n \"zalau\" real,\n \"electrica_north_transylvania\" real\n);\n\nQuestion: What is the smallest Satu Mare value associated with Baia Mare over 523?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"satu_mare\") FROM \"distribution\" WHERE \"baia_mare\">523;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"format\" text,\n \"filename_extension\" text,\n \"image_support\" text,\n \"interactivity_support\" text,\n \"word_wrap_support\" text,\n \"open_standard\" text\n);\n\nQuestion: Which Word wrap support has a Format of mobipocket?"
},
{
"role": "assistant",
"content": "SELECT \"word_wrap_support\" FROM \"features\" WHERE \"format\"='mobipocket';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"format\" text,\n \"filename_extension\" text,\n \"image_support\" text,\n \"interactivity_support\" text,\n \"word_wrap_support\" text,\n \"open_standard\" text\n);\n\nQuestion: Which Interactivity support has a Format of fictionbook?"
},
{
"role": "assistant",
"content": "SELECT \"interactivity_support\" FROM \"features\" WHERE \"format\"='fictionbook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"format\" text,\n \"filename_extension\" text,\n \"image_support\" text,\n \"interactivity_support\" text,\n \"word_wrap_support\" text,\n \"open_standard\" text\n);\n\nQuestion: Which Filename extension has an Interactivity support of no, an Open standard of yes, and an Image support of no?"
},
{
"role": "assistant",
"content": "SELECT \"filename_extension\" FROM \"features\" WHERE \"interactivity_support\"='no' AND \"open_standard\"='yes' AND \"image_support\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"format\" text,\n \"filename_extension\" text,\n \"image_support\" text,\n \"interactivity_support\" text,\n \"word_wrap_support\" text,\n \"open_standard\" text\n);\n\nQuestion: Which Filename extension has a Word wrap support of yes, an Open standard of no, and an Interactivity support of yes?"
},
{
"role": "assistant",
"content": "SELECT \"filename_extension\" FROM \"features\" WHERE \"word_wrap_support\"='yes' AND \"open_standard\"='no' AND \"interactivity_support\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"format\" text,\n \"filename_extension\" text,\n \"image_support\" text,\n \"interactivity_support\" text,\n \"word_wrap_support\" text,\n \"open_standard\" text\n);\n\nQuestion: Which Format has an Interactivity support of no, a Word wrap support of yes, an Image support of yes, and an Open standard of yes?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"features\" WHERE \"interactivity_support\"='no' AND \"word_wrap_support\"='yes' AND \"image_support\"='yes' AND \"open_standard\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Position of guard, and a Pick # larger than 9 is what highest round?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"position\"='guard' AND \"pick_num\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Pick # smaller than 11, and a Name of von hutchins belongs to what college?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"indianapolis_colts_draft_history\" WHERE \"pick_num\"<11 AND \"name\"='von hutchins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: College of idaho, and an Overall smaller than 141 is what average round?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"college\"='idaho' AND \"overall\"<141;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name of David Kimball, and an Overall smaller than 229 is what highest round?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='david kimball' AND \"overall\"<229;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did the car with the brm v8 engine have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='brm v8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which chassis has more than 0 points and was before 1966?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1966 AND \"points\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did he average in 1964?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1964;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Before the year 1963 what was the fewest points the climax v8 engine had?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='climax v8' AND \"year\"<1963;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the earliest year that had less than 1 point?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"points\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is the 8:00 feature with je at 7:00?"
},
{
"role": "assistant",
"content": "SELECT \"8_00\" FROM \"friday\" WHERE \"7_00\"='je';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is the 10:00 feature with 1 vs. 100 at 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"friday\" WHERE \"8_30\"='1 vs. 100';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is the 7:00 feature with entertainment tonight at 7:30?"
},
{
"role": "assistant",
"content": "SELECT \"7_00\" FROM \"friday\" WHERE \"7_30\"='entertainment tonight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is the 7:30 feature with le tva 22 heures at 10:00?"
},
{
"role": "assistant",
"content": "SELECT \"7_30\" FROM \"friday\" WHERE \"10_00\"='le tva 22 heures';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is the 9:30 feature with la porte des \u00e9toiles at 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"9_30\" FROM \"friday\" WHERE \"8_30\"='la porte des \u00e9toiles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many were in attendance on October 27, 1963?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"season_schedule\" WHERE \"date\"='october 27, 1963';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: which # / county is correct for year less than 1981 and chalmers as location?"
},
{
"role": "assistant",
"content": "SELECT \"num_county\" FROM \"membership\" WHERE \"year_joined\"<1981 AND \"location\"='chalmers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: what is the correct year for # / county of 09 cass?"
},
{
"role": "assistant",
"content": "SELECT \"year_joined\" FROM \"membership\" WHERE \"num_county\"='09 cass';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: what's the mascot for 66 pulaski 2?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"membership\" WHERE \"num_county\"='66 pulaski 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sporting_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total bronze with a Silver of 2, and a Gold smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"sporting_events\" WHERE \"silver\"=2 AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sporting_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average total with a Rank larger than 11, a Nation of switzerland, and a Silver smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"sporting_events\" WHERE \"rank\">11 AND \"nation\"='switzerland' AND \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sporting_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total Gold with a Bronze smaller than 7, a Total of 1, a Nation of cape verde, and a Silver smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"sporting_events\" WHERE \"bronze\"<7 AND \"total\"=1 AND \"nation\"='cape verde' AND \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"year\" real\n);\n\nQuestion: How powerful is the model before 1999?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"models\" WHERE \"year\"<1999;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"year\" real\n);\n\nQuestion: What displacement is the model in 1999 with a Torque of 280n\u00b7m (207lb\u00b7ft) @ 1750?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"models\" WHERE \"year\"=1999 AND \"torque\"='280n\u00b7m (207lb\u00b7ft) @ 1750';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"year\" real\n);\n\nQuestion: When is the earliest year with a Power of 90kw (121hp) @ 4000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"models\" WHERE \"power\"='90kw (121hp) @ 4000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"year\" real\n);\n\nQuestion: When is the earliest year with a Torque of 330n\u00b7m (243lb\u00b7ft) @ 2000-2500?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"models\" WHERE \"torque\"='330n\u00b7m (243lb\u00b7ft) @ 2000-2500';"
}
]
|
[
{
"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 14 has the lowest attendance?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=14;"
}
]
|
[
{
"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: Which sum of week that had an attendance larger than 55,767 on September 28, 1986?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\">'55,767' AND \"date\"='september 28, 1986';"
}
]
|
[
{
"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 highest attendance on September 14, 1986?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 14, 1986';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What type is the race with the vicenza to marostica course?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"course\"='vicenza to marostica';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" 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);\n\nQuestion: Name the 2005 for 2003 of a and 2011 of 3r"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2003\"='a' AND \"2011\"='3r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" 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);\n\nQuestion: Name the 2006 with 2003 of a and 2012 of a"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2003\"='a' AND \"2012\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" 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);\n\nQuestion: Name the 2010 for 2006 of 2r"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2006\"='2r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" 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);\n\nQuestion: Name the 2007 for 2005 of a and 003 of a with 2009 of sf"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2005\"='a' AND \"2003\"='a' AND \"2009\"='sf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" 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);\n\nQuestion: Name the 2011 with 2006 of 2r"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2006\"='2r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: what was the venue on 7 october 2011?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='7 october 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quadruple_or_four_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What is the highest number of the match with julio c\u00e9sar v\u00e1squez as the opponent?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number\") FROM \"list_of_boxing_quadruple_or_four_divisio\" WHERE \"opponent\"='julio c\u00e9sar v\u00e1squez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quadruple_or_four_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who was the opponent of the match on 2006-04-08?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"list_of_boxing_quadruple_or_four_divisio\" WHERE \"date\"='2006-04-08';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quadruple_or_four_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the match with Zab Judah as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"list_of_boxing_quadruple_or_four_divisio\" WHERE \"opponent\"='zab judah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quadruple_or_four_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What is the date of the match with a result of ud 12/12 between Pernell Whitaker and James Mcgirt?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"list_of_boxing_quadruple_or_four_divisio\" WHERE \"result\"='ud 12/12' AND \"name\"='pernell whitaker' AND \"opponent\"='james mcgirt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_wins\" (\n \"margin\" real,\n \"score\" text,\n \"opponent\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What score was on 13 June 2004?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"biggest_wins\" WHERE \"date\"='13 june 2004';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_tour_finishers\" (\n \"rider\" text,\n \"year\" real,\n \"final_position_giro\" real,\n \"final_position_tour\" real,\n \"final_position_vuelta\" real\n);\n\nQuestion: Who is the rider with less than 50 final position-tours and less than 11 final position-vuelta before 2008?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"grand_tour_finishers\" WHERE \"final_position_tour\"<50 AND \"final_position_vuelta\"<11 AND \"year\"<2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_tour_finishers\" (\n \"rider\" text,\n \"year\" real,\n \"final_position_giro\" real,\n \"final_position_tour\" real,\n \"final_position_vuelta\" real\n);\n\nQuestion: What is the earliest year of Valdimir Poelnikov, who has a final position-tour bigger than 72, a final position-vuelta less than 77, and a final position-giro less than 57?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"grand_tour_finishers\" WHERE \"final_position_tour\">72 AND \"final_position_vuelta\"<77 AND \"final_position_giro\"<57 AND \"rider\"='valdimir poelnikov';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_tour_finishers\" (\n \"rider\" text,\n \"year\" real,\n \"final_position_giro\" real,\n \"final_position_tour\" real,\n \"final_position_vuelta\" real\n);\n\nQuestion: What is the number of final position-tours Mariano Piccoli, who has more than 20 final position-giros, before 1999 has?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"final_position_tour\") FROM \"grand_tour_finishers\" WHERE \"final_position_giro\">20 AND \"rider\"='mariano piccoli' AND \"year\"<1999;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_tour_finishers\" (\n \"rider\" text,\n \"year\" real,\n \"final_position_giro\" real,\n \"final_position_tour\" real,\n \"final_position_vuelta\" real\n);\n\nQuestion: What year was the rider with a final position-tour of 88 and less than 11 final position-giros?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"grand_tour_finishers\" WHERE \"final_position_tour\"=88 AND \"final_position_giro\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How much did they lose by on April 26?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='april 26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the highest attendance when the opponent was the Indians and the record was 13-4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='indians' AND \"record\"='13-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What day did the record reach 15-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='15-4';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.