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 \"by_country_tally\" (\n \"rank\" real,\n \"country\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What is the least 3rd RU that is ranked less than 8 with a 4th RU greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"3rd_ru\") FROM \"by_country_tally\" WHERE \"4th_ru\">0 AND \"rank\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is Result, when Competition is 2010 FIFA World Cup Qualification, and when Date is 10 September 2008?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"goals_for_senior_national_team\" WHERE \"competition\"='2010 fifa world cup qualification' AND \"date\"='10 september 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is Venue, when Competition is 2010 FIFA World Cup Qualification, when Result is Won, and when Date is 14 June 2008?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"goals_for_senior_national_team\" WHERE \"competition\"='2010 fifa world cup qualification' AND \"result\"='won' AND \"date\"='14 june 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals_for_senior_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is Competition, when Date is 30 December 2005?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"goals_for_senior_national_team\" WHERE \"date\"='30 december 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the Place when the score is less than 71, and Country is zimbabwe?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"<71 AND \"country\"='zimbabwe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the lowest Score when the Country is canada?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score\") FROM \"first_round\" WHERE \"country\"='canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the Score when the Player is toru taniguchi?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round\" WHERE \"player\"='toru taniguchi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Game number when the Rangers have a Record of 25-24-11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"schedule_and_results\" WHERE \"record\"='25-24-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of the game on March 18?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"march\"=18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 2 of team rocketsports racing, which has the best of 1:10.949?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"team\"='rocketsports racing' AND \"best\"='1:10.949';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Which team has a 1:10.998 best?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"best\"='1:10.998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the name of the person with a 1:10.771 qual 2?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:10.771';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 2 with a 1:10.949 best?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"best\"='1:10.949';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 2 of team Forsythe racing, which has a 1:09.515 best?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"team\"='forsythe racing' AND \"best\"='1:09.515';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 1 with a 1:09.567 best?"
},
{
"role": "assistant",
"content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"best\"='1:09.567';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_2011_season\" (\n \"position\" real,\n \"driver_passenger\" text,\n \"equipment\" text,\n \"bike_no\" real,\n \"points\" real\n);\n\nQuestion: What were highest points received from someone using a zabel-wsp with a position greater than 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"the_2011_season\" WHERE \"equipment\"='zabel-wsp' AND \"position\">7;"
}
] |
[
{
"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's the lowest attendance recorded for week 15?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: When Marlene was nominated for the Olivier Award, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_nominations\" WHERE \"nominated_work\"='marlene' AND \"award\"='olivier award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the Bafta Tv award?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_nominations\" WHERE \"award\"='bafta tv award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is the pick of Texas-San Antonio?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"draft_picks\" WHERE \"college\"='texas-san antonio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: Who is the player that has a round greater than 2 and a pick bigger than 83?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\">2 AND \"pick\">83;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What's the nationality of Louisiana Tech?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college\"='louisiana tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What number pick is Ray Hall?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"draft_picks\" WHERE \"player\"='ray hall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What nationality has a pick greater than 129?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"pick\">129;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the rider is mika kallio?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"250cc_classification\" WHERE \"rider\"='mika kallio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: what is the time when laps is less than 21, manufacturer is aprilia, grid is less than 17 and the rider is thomas luthi?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"250cc_classification\" WHERE \"laps\"<21 AND \"manufacturer\"='aprilia' AND \"grid\"<17 AND \"rider\"='thomas luthi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: what is the time when the laps is less than 21 and the grid is more than 17?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"250cc_classification\" WHERE \"laps\"<21 AND \"grid\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partnering\" text,\n \"against\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: Who was partnering when nueza silva played against greece?"
},
{
"role": "assistant",
"content": "SELECT \"partnering\" FROM \"doubles_12\" WHERE \"against\"='greece';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partnering\" text,\n \"against\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: What was the round when nueza silva played against greece?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"doubles_12\" WHERE \"against\"='greece';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partnering\" text,\n \"against\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: Who were the opponents during the 2006 fed cup europe/africa group ii against greece?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_12\" WHERE \"edition\"='2006 fed cup europe/africa group ii' AND \"against\"='greece';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is the Tries against for the team that has 207 points for?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"pool_3\" WHERE \"points_for\"='207';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What team has a 118 Point for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"pool_3\" WHERE \"points_for\"='118';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What team has 102 Points against?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"pool_3\" WHERE \"points_against\"='102';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is the Points for number of the team with a 10 Tries against number?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"pool_3\" WHERE \"tries_against\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What team has +119 Points diff?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"pool_3\" WHERE \"points_diff\"='+119';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_h_4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What manufacturer has a year made of 1923?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"class_h_4_6_2\" WHERE \"year_made\"='1923';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_h_4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What's the quantity made when the manufacturer was 4-6-2 \u2014 oooooo \u2014 pacific?"
},
{
"role": "assistant",
"content": "SELECT \"quantity_made\" FROM \"class_h_4_6_2\" WHERE \"manufacturer\"='4-6-2 \u2014 oooooo \u2014 pacific';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_h_4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What year had a quantity made of 11 and a wheel arrangement of 4-6-2?"
},
{
"role": "assistant",
"content": "SELECT \"year_made\" FROM \"class_h_4_6_2\" WHERE \"wheel_arrangement\"='4-6-2' AND \"quantity_made\"='11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_h_4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What's the quantity preserved when the fleet number was 700?"
},
{
"role": "assistant",
"content": "SELECT \"quantity_preserved\" FROM \"class_h_4_6_2\" WHERE \"fleet_number_s\"='700';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_women\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the name of the race in Kenya with a time of 30:27?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"top_10_women\" WHERE \"nation\"='kenya' AND \"time\"='30:27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_women\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the name of the athlete with a time of 30:48?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"top_10_women\" WHERE \"time\"='30:48';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_women\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the name of the race when Lineth Chepkurui is the athlete?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"top_10_women\" WHERE \"athlete\"='lineth chepkurui';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_women\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the time when the race was in Kenya and Lineth Chepkurui was the athlete?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"top_10_women\" WHERE \"nation\"='kenya' AND \"athlete\"='lineth chepkurui';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the country for the player who had a To Par of +4?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"to_par\"='+4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What player from South Africa had a total less than 284?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"<284 AND \"country\"='south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: For the year won of 2001, what is the To Par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"year_s_won\"='2001';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the location attendance when the series is 4-3?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"playoffs\" WHERE \"series\"='4-3';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the team when the location attendace is boston garden and the series is 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"location_attendance\"='boston garden' AND \"series\"='0-1';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the highest game when the team is @boston and the series is 0-1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"playoffs\" WHERE \"team\"='@boston' AND \"series\"='0-1';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the series when the team is @boston and the game is smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"team\"='@boston' AND \"game\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1996 is \"0 / 2\"?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"1996\"='0 / 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1998, when 1992 is \"A\", and when Tournament is \"Hamburg Masters\"?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"singles_performance_timeline\" WHERE \"1992\"='a' AND \"tournament\"='hamburg masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1994 is \"A\", and when Tournament is \"Monte Carlo Masters\"?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"1994\"='a' AND \"tournament\"='monte carlo masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1999, when 2003 is \"A\", and when Career SR is \"0 / 4\"?"
},
{
"role": "assistant",
"content": "SELECT \"1999\" FROM \"singles_performance_timeline\" WHERE \"2003\"='a' AND \"career_sr\"='0 / 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2000, when Tournament is \"Canada Masters\"?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='canada masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is the player ho had a To par of +1 and a score of 69-70-72=211 from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"to_par\"='+1' AND \"score\"='69-70-72=211';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place did the player from South Africa finish?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"country\"='south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Tom Purtzer from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='tom purtzer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the score of united states player wally armstrong when he had a To par of +1"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='united states' AND \"to_par\"='+1' AND \"player\"='wally armstrong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the score of Wally Armstrong?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='wally armstrong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is the verb meaning when the part 1 is lopen?"
},
{
"role": "assistant",
"content": "SELECT \"verb_meaning\" FROM \"dutch\" WHERE \"part_1\"='lopen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is the part 4 when the verb meaning is to steal?"
},
{
"role": "assistant",
"content": "SELECT \"part_4\" FROM \"dutch\" WHERE \"verb_meaning\"='to steal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is the class when part 2 is bond?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"dutch\" WHERE \"part_2\"='bond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is part 4 when the class is 5?"
},
{
"role": "assistant",
"content": "SELECT \"part_4\" FROM \"dutch\" WHERE \"class\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is part 1 when the class is 7d?"
},
{
"role": "assistant",
"content": "SELECT \"part_1\" FROM \"dutch\" WHERE \"class\"='7d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dutch\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: what is part 2 when part 4 is gebonden?"
},
{
"role": "assistant",
"content": "SELECT \"part_2\" FROM \"dutch\" WHERE \"part_4\"='gebonden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: What's the boiling point when the density is 1.092 g/ml?"
},
{
"role": "assistant",
"content": "SELECT \"boiling_point\" FROM \"properties_of_common_solvents\" WHERE \"density\"='1.092 g/ml';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: What solvent has a boiling point of 100\u2013103 \u00b0c?"
},
{
"role": "assistant",
"content": "SELECT \"solvent\" FROM \"properties_of_common_solvents\" WHERE \"boiling_point\"='100\u2013103 \u00b0c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: What's the Dielectric constant of ch 3 -c(=o)oh?"
},
{
"role": "assistant",
"content": "SELECT \"dielectric_constant\" FROM \"properties_of_common_solvents\" WHERE \"chemical_formula\"='ch 3 -c(=o)oh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: What dipole moment has a density of 1.092 g/ml?"
},
{
"role": "assistant",
"content": "SELECT \"dipole_moment_d\" FROM \"properties_of_common_solvents\" WHERE \"density\"='1.092 g/ml';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: What's the dipole moment of ethyl acetate (etoac)?"
},
{
"role": "assistant",
"content": "SELECT \"dipole_moment_d\" FROM \"properties_of_common_solvents\" WHERE \"solvent\"='ethyl acetate (etoac)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_common_solvents\" (\n \"solvent\" text,\n \"chemical_formula\" text,\n \"boiling_point\" text,\n \"dielectric_constant\" text,\n \"density\" text,\n \"dipole_moment_d\" text\n);\n\nQuestion: what's the boiling point of diethyl ether?"
},
{
"role": "assistant",
"content": "SELECT \"boiling_point\" FROM \"properties_of_common_solvents\" WHERE \"solvent\"='diethyl ether';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Type, when Works Number is 75823?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"diesel_locomotives\" WHERE \"works_number\"='75823';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Date, when Type is DS4-4-750, and when Works Number is 74409?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"diesel_locomotives\" WHERE \"type\"='ds4-4-750' AND \"works_number\"='74409';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Works Number, when Type is RS-11, and when Number is 61?"
},
{
"role": "assistant",
"content": "SELECT \"works_number\" FROM \"diesel_locomotives\" WHERE \"type\"='rs-11' AND \"number\"='61';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Builder, when Date is 1925?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"diesel_locomotives\" WHERE \"date\"='1925';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Works Number, when Number is 55?"
},
{
"role": "assistant",
"content": "SELECT \"works_number\" FROM \"diesel_locomotives\" WHERE \"number\"='55';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diesel_locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is Builder, when Date is 1953?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"diesel_locomotives\" WHERE \"date\"='1953';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Attendance is the lowest one that has a Record of 5\u20135\u20130?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"final_standings\" WHERE \"record\"='5\u20135\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Date has a Record of 4\u20132\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"final_standings\" WHERE \"record\"='4\u20132\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has a Visitor of pittsburgh, and a Score of 4\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"final_standings\" WHERE \"visitor\"='pittsburgh' AND \"score\"='4\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"time\" text\n);\n\nQuestion: What was the away team score when Waverley Park was the ground and the home team was collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_of_14\" WHERE \"ground\"='waverley park' AND \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"time\" text\n);\n\nQuestion: Who was the home team at 8:00 pm when the score was 11.18 (84)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_of_14\" WHERE \"time\"='8:00 pm' AND \"home_team_score\"='11.18 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: From what country did someone score 71?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"=71;"
}
] |
[
{
"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 \"at_vs\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance sum of the game on March 16, 1990 with a loss record?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"record\"='loss' AND \"date\"='march 16, 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_26_12_14\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match on August 20, 1978?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_26_12_14\" WHERE \"date\"='august 20, 1978';"
}
] |
[
{
"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 Round has a Pick smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"pick\"<6;"
}
] |
[
{
"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 Round has an Overall smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"overall\"<6;"
}
] |
[
{
"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 College of washington, and an Overall of 46?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"college\"='washington' 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: Which Round has a Position of qb, and an Overall larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='qb' AND \"overall\">6;"
}
] |
[
{
"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 date was Bury the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"third_round_proper\" WHERE \"away_team\"='bury';"
}
] |
[
{
"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 team was the home team when Tottenham Hotspur is the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='tottenham hotspur';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"rnd\" text,\n \"pick_num\" real,\n \"nfl_team\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What college did the #22 overall draft pick attend?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"player_selections\" WHERE \"pick_num\"=22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"rnd\" text,\n \"pick_num\" real,\n \"nfl_team\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What draft pick number attended syracuse and was drafted by the Carolina panthers?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick_num\") FROM \"player_selections\" WHERE \"nfl_team\"='carolina panthers' AND \"college\"='syracuse';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_countries_by_2010_emissions_esti\" (\n \"country\" text,\n \"co2_emissions\" text,\n \"area_in_km_2\" real,\n \"population\" real,\n \"emission_person\" real\n);\n\nQuestion: If the area of a country is over 9,826,675 kilometers and a total of emissions per person less than 14.9, what's the average Population found?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"list_of_countries_by_2010_emissions_esti\" WHERE \"area_in_km_2\">'9,826,675' AND \"emission_person\"<14.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_countries_by_2010_emissions_esti\" (\n \"country\" text,\n \"co2_emissions\" text,\n \"area_in_km_2\" real,\n \"population\" real,\n \"emission_person\" real\n);\n\nQuestion: What's the average population of Mexico if the area is 1,972,550 kilometers squared?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"list_of_countries_by_2010_emissions_esti\" WHERE \"country\"='mexico' AND \"area_in_km_2\">'1,972,550';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"date_administered\" text,\n \"democrat\" text,\n \"republican\" text,\n \"lead_margin\" real\n);\n\nQuestion: Which Lead Margin has a Poll Source of rasmussen reports/ fox news?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lead_margin\") FROM \"polling\" WHERE \"poll_source\"='rasmussen reports/ fox news';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"date_administered\" text,\n \"democrat\" text,\n \"republican\" text,\n \"lead_margin\" real\n);\n\nQuestion: Which Poll Source has a Date administered of october 30 \u2013 november 2, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"polling\" WHERE \"date_administered\"='october 30 \u2013 november 2, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: At which site was Northwestern an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"schedule\" WHERE \"opponentnum\"='northwestern';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What result did Indiana have when they were an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponentnum\"='indiana';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.