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 \"campeonato_brasileiro_s_rie_b\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number of points team vit\u00f3ria, which had more than 38 played, had?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"campeonato_brasileiro_s_rie_b\" WHERE \"team\"='vit\u00f3ria' AND \"played\">38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_3_ribbons_2_hoops\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: When the A Score was larger than 5.933 with a total of 19.833, what nation was this?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"groups_3_ribbons_2_hoops\" WHERE \"a_score\">5.933 AND \"total\"=19.833;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_3_ribbons_2_hoops\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: How large was the total when the E Score was greater than 9.35 and T Score was less than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"groups_3_ribbons_2_hoops\" WHERE \"e_score\">9.35 AND \"t_score\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_3_ribbons_2_hoops\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the quantity of the A Score when the E Score was larger than 9.566 in the Greece and the T score was more than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"a_score\") FROM \"groups_3_ribbons_2_hoops\" WHERE \"e_score\">9.566 AND \"nation\"='greece' AND \"t_score\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_3_ribbons_2_hoops\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the total of A Score when the E Score was greater than 9.383, total was less than 19.716 and the T Score was larger than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"a_score\") FROM \"groups_3_ribbons_2_hoops\" WHERE \"e_score\">9.383 AND \"total\"<19.716 AND \"t_score\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which city has a frequency of 104.5 fm?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"frequency_m_hz\"='104.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the frequency of Walterboro, SC?"
},
{
"role": "assistant",
"content": "SELECT \"frequency_m_hz\" FROM \"translators\" WHERE \"city_of_license\"='walterboro, sc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the FCC information of 104.5 fm frequency?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\"='104.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is Charleston, SC ERP W?"
},
{
"role": "assistant",
"content": "SELECT \"erp_w\" FROM \"translators\" WHERE \"city_of_license\"='charleston, sc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What does the ERP W sum equal for 105.1 fm frequency?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"erp_w\") FROM \"translators\" WHERE \"frequency_m_hz\"='105.1 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is surfside beach, SC frequency?"
},
{
"role": "assistant",
"content": "SELECT \"frequency_m_hz\" FROM \"translators\" WHERE \"city_of_license\"='surfside beach, sc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the player from Japan's To Par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='japan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the player from England's To Par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the player from England's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country does Adam Scott play for?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='adam scott';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for lilongwe international airport"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"airport\"='lilongwe international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the airport for ICAO of flls"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"icao\"='flls';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for lilongwe international airport"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"airport\"='lilongwe international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the ICAO for julius nyerere international airport"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"airport\"='julius nyerere international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the country for johannesburg"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"city\"='johannesburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Name the city for IATA of llw"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"iata\"='llw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the name of the home time with a 10 tie no?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round\" WHERE \"tie_no\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date of the game that was played against the away team of York City?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"second_round\" WHERE \"away_team\"='york city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: What group of juventus had an attendance larger than 47,786?"
},
{
"role": "assistant",
"content": "SELECT \"group_position\" FROM \"group_stage\" WHERE \"opponents\"='juventus' AND \"attendance\">'47,786';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Name the average week for result of l 28\u201317"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 28\u201317';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toronto_maple_leafs_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score on April 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"toronto_maple_leafs_4_detroit_red_wings_\" WHERE \"date\"='april 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toronto_maple_leafs_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on April 6?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"toronto_maple_leafs_4_detroit_red_wings_\" WHERE \"date\"='april 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2009 has a 2008 of A, and a 2010 of 4r?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"performance_timeline\" WHERE \"2008\"='a' AND \"2010\"='4r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2009 has a 2008 of wta premier mandatory tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"performance_timeline\" WHERE \"2008\"='wta premier mandatory tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2010 has a Tournament of australian open?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"performance_timeline\" WHERE \"tournament\"='australian open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2007 has a 2006 of A, and a Tournament of canada?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"performance_timeline\" WHERE \"2006\"='a' AND \"tournament\"='canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2009 has a 2006 of A, and a 2011 of sf?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"performance_timeline\" WHERE \"2006\"='a' AND \"2011\"='sf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" 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: Which 2007 has a 2010 of A?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"performance_timeline\" WHERE \"2010\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_boys\" (\n \"discipline\" text,\n \"peter\" real,\n \"adam\" real,\n \"jade\" real,\n \"plat_num\" real\n);\n\nQuestion: Adam is less than 1 and Jade is greater than 5 in cycling, what's the plat'num?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"plat_num\") FROM \"the_boys\" WHERE \"adam\"<1 AND \"discipline\"='cycling' AND \"jade\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_boys\" (\n \"discipline\" text,\n \"peter\" real,\n \"adam\" real,\n \"jade\" real,\n \"plat_num\" real\n);\n\nQuestion: What is Peter's score in kendo that has a plat'num less than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"peter\") FROM \"the_boys\" WHERE \"discipline\"='kendo' AND \"plat_num\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_boys\" (\n \"discipline\" text,\n \"peter\" real,\n \"adam\" real,\n \"jade\" real,\n \"plat_num\" real\n);\n\nQuestion: What is Adam's score when Peter's score is less than 3 and the plat'num is greater than 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"adam\") FROM \"the_boys\" WHERE \"peter\"<3 AND \"plat_num\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_boys\" (\n \"discipline\" text,\n \"peter\" real,\n \"adam\" real,\n \"jade\" real,\n \"plat_num\" real\n);\n\nQuestion: Peter has a score greater than 5 in speed skating, what is the plat'num?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"plat_num\") FROM \"the_boys\" WHERE \"discipline\"='speed skating' AND \"peter\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_boys\" (\n \"discipline\" text,\n \"peter\" real,\n \"adam\" real,\n \"jade\" real,\n \"plat_num\" real\n);\n\nQuestion: What's Adam's score when Jade's score is greater than 5 and Peter's score is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"adam\") FROM \"the_boys\" WHERE \"jade\">5 AND \"peter\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Old Scotch had less than 9 losses and how much against?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2012_ladder\" WHERE \"losses\"<9 AND \"ntfa_div_2\"='old scotch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Of the teams that had more than 0 byes, what was the total number of losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2012_ladder\" WHERE \"byes\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Who was the incumbent in the 20th district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"election_results\" WHERE \"district\"='20th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Which party has the 6th district?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"election_results\" WHERE \"district\"='6th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Which party has Ken Cuccinelli as an incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"election_results\" WHERE \"incumbent\"='ken cuccinelli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Which party was elected in 2003 with incumbent Mark Obenshain?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"election_results\" WHERE \"elected\"=2003 AND \"incumbent\"='mark obenshain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text\n);\n\nQuestion: Which incumbent was in the 24th district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"election_results\" WHERE \"district\"='24th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Name the sum of laps for mi-jack conquest racing and points less than 11"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"race\" WHERE \"team\"='mi-jack conquest racing' AND \"points\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Name the points with grid more than 8 and time/retired of +47.487 secs"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race\" WHERE \"grid\">8 AND \"time_retired\"='+47.487 secs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Name the team with laps of 97 and grid of 3"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race\" WHERE \"laps\"=97 AND \"grid\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Name the sum of grid with laps more than 97"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"laps\">97;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What are the most wins in 1971 in 250cc class?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"class\"='250cc' AND \"year\"=1971;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the earliest year with less than 45 points for Yamaha team in 21st rank?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"points\"<45 AND \"team\"='yamaha' AND \"rank\"='21st';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_robin_standings\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: How many Ends Won have Blank Ends smaller than 14, and a Locale of manitoba, and Stolen Ends larger than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"ends_won\") FROM \"round_robin_standings\" WHERE \"blank_ends\"<14 AND \"locale\"='manitoba' AND \"stolen_ends\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_robin_standings\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: Which Skip has Ends Lost larger than 44, and Blank Ends of 10?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"round_robin_standings\" WHERE \"ends_lost\">44 AND \"blank_ends\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_robin_standings\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: How many Stolen Ends have Ends Lost smaller than 44, and Blank Ends smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"stolen_ends\") FROM \"round_robin_standings\" WHERE \"ends_lost\"<44 AND \"blank_ends\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_fleet\" (\n \"make\" text,\n \"year_placed_in_service\" text,\n \"quantity\" real,\n \"number_of_seats\" real,\n \"wheelchair_accessible\" text,\n \"current_status\" text\n);\n\nQuestion: What is the current status for GM Advanced Design with more than 41 seats?"
},
{
"role": "assistant",
"content": "SELECT \"current_status\" FROM \"historical_fleet\" WHERE \"make\"='gm advanced design' AND \"number_of_seats\">41;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_fleet\" (\n \"make\" text,\n \"year_placed_in_service\" text,\n \"quantity\" real,\n \"number_of_seats\" real,\n \"wheelchair_accessible\" text,\n \"current_status\" text\n);\n\nQuestion: What is the quantity with more than 45 seats and MCI make?"
},
{
"role": "assistant",
"content": "SELECT \"quantity\" FROM \"historical_fleet\" WHERE \"number_of_seats\">45 AND \"make\"='mci';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_fleet\" (\n \"make\" text,\n \"year_placed_in_service\" text,\n \"quantity\" real,\n \"number_of_seats\" real,\n \"wheelchair_accessible\" text,\n \"current_status\" text\n);\n\nQuestion: What is the largest number of seats with more than 32 of a MCI make?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_seats\") FROM \"historical_fleet\" WHERE \"make\"='mci' AND \"quantity\">32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_fleet\" (\n \"make\" text,\n \"year_placed_in_service\" text,\n \"quantity\" real,\n \"number_of_seats\" real,\n \"wheelchair_accessible\" text,\n \"current_status\" text\n);\n\nQuestion: What is the smallest number of seats in a vehicle currently retired and in quantities less than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_seats\") FROM \"historical_fleet\" WHERE \"current_status\"='retired' AND \"quantity\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_fleet\" (\n \"make\" text,\n \"year_placed_in_service\" text,\n \"quantity\" real,\n \"number_of_seats\" real,\n \"wheelchair_accessible\" text,\n \"current_status\" text\n);\n\nQuestion: What is the smallest number of seats in a retired vehicle that was started in service in 1981?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_seats\") FROM \"historical_fleet\" WHERE \"current_status\"='retired' AND \"year_placed_in_service\"='1981';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"middle_tennessee\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: What is Trevard Lindley's height?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"middle_tennessee\" WHERE \"name\"='trevard lindley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"middle_tennessee\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: What is Ashton Cobb's class in Game 2?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"middle_tennessee\" WHERE \"games\"=2 AND \"name\"='ashton cobb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"middle_tennessee\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: What is the earliest game with a position of Re and a smaller number than 95?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"games\") FROM \"middle_tennessee\" WHERE \"position\"='re' AND \"number\"<95;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterbacks_ranked_by_regular_season_wi\" (\n \"rank\" real,\n \"quarterback\" text,\n \"seasons\" text,\n \"teams\" text,\n \"team_wins\" real,\n \"team_losses\" real,\n \"career_wins\" real,\n \"career_losses\" real,\n \"ties\" real\n);\n\nQuestion: Which Seattle quarterback has more than 81 career wins and less than 70 team wins?"
},
{
"role": "assistant",
"content": "SELECT \"quarterback\" FROM \"quarterbacks_ranked_by_regular_season_wi\" WHERE \"career_wins\">81 AND \"teams\"='seattle' AND \"team_wins\"<70;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Mike Harris' lowest overall?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"name\"='mike harris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick # that has a 228 overall and a round less than 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\"=228 AND \"round\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"type\" text,\n \"actual_exponent\" text,\n \"exp_biased\" text,\n \"exponent_field\" text,\n \"significand_fraction_field\" text,\n \"value\" text\n);\n\nQuestion: What value has negative infinity?"
},
{
"role": "assistant",
"content": "SELECT \"value\" FROM \"examples\" WHERE \"type\"='negative infinity';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"type\" text,\n \"actual_exponent\" text,\n \"exp_biased\" text,\n \"exponent_field\" text,\n \"significand_fraction_field\" text,\n \"value\" text\n);\n\nQuestion: What's the exponent field that has 255 exp and value of +\u221e?"
},
{
"role": "assistant",
"content": "SELECT \"exponent_field\" FROM \"examples\" WHERE \"exp_biased\"='255' AND \"value\"='+\u221e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"type\" text,\n \"actual_exponent\" text,\n \"exp_biased\" text,\n \"exponent_field\" text,\n \"significand_fraction_field\" text,\n \"value\" text\n);\n\nQuestion: What's the type of 0.0 value?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"examples\" WHERE \"value\"='0.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"type\" text,\n \"actual_exponent\" text,\n \"exp_biased\" text,\n \"exponent_field\" text,\n \"significand_fraction_field\" text,\n \"value\" text\n);\n\nQuestion: What's the Significant of a value 1.0?"
},
{
"role": "assistant",
"content": "SELECT \"significand_fraction_field\" FROM \"examples\" WHERE \"value\"='1.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 4th career/salary of navigator ($90,000-degree) involves what 3rd career/salary?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_career_salary\" FROM \"careers\" WHERE \"4th_career_salary\"='navigator ($90,000-degree)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 5th career/salary of automotive designer ($350,000-degree) had what career card?"
},
{
"role": "assistant",
"content": "SELECT \"career_card\" FROM \"careers\" WHERE \"5th_career_salary\"='automotive designer ($350,000-degree)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 2nd career/salary of substitute teacher ($20,000) involves what 6th career/salary?"
},
{
"role": "assistant",
"content": "SELECT \"6th_career_salary\" FROM \"careers\" WHERE \"2nd_career_salary\"='substitute teacher ($20,000)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 6th career/salary of design consultant ($500,000-degree) involves what 3rd career/salary?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_career_salary\" FROM \"careers\" WHERE \"6th_career_salary\"='design consultant ($500,000-degree)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 4th career/salary of clown ($80,000) had what 2nd career/salary?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_career_salary\" FROM \"careers\" WHERE \"4th_career_salary\"='clown ($80,000)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"careers\" (\n \"career_card\" text,\n \"starting_career_salary\" text,\n \"2nd_career_salary\" text,\n \"3rd_career_salary\" text,\n \"4th_career_salary\" text,\n \"5th_career_salary\" text,\n \"6th_career_salary\" text\n);\n\nQuestion: 5th career/salary of restaurant manager ($250,000) had what 2nd career/salary?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_career_salary\" FROM \"careers\" WHERE \"5th_career_salary\"='restaurant manager ($250,000)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest round of the pick #8 player with an overall greater than 72 from the college of temple?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"pick_num\"=8 AND \"college\"='temple' AND \"overall\">72;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest overall of the wide receiver player from a round higher than 5 and a pick lower than 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='wide receiver' AND \"round\"<5 AND \"pick_num\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall of the running back player?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='running back';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"malaysian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the general classification when the team classification is japan?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"team_classification\"='japan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"malaysian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: When Yusuke Hatanaka was the stage winner in the tonton susanto general classification, what was the malaysian rider classification?"
},
{
"role": "assistant",
"content": "SELECT \"malaysian_rider_classification\" FROM \"classification_leadership\" WHERE \"general_classification\"='tonton susanto' AND \"stage_winner\"='yusuke hatanaka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"malaysian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: When Yusuke Hatanaka was the stage winner in the tabriz petrochemical team classification, what was the mountains classification?"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"classification_leadership\" WHERE \"team_classification\"='tabriz petrochemical team' AND \"stage_winner\"='yusuke hatanaka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"malaysian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which stage had tabriz petrochemical team in the team classification?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership\" WHERE \"team_classification\"='tabriz petrochemical team';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"malaysian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which stage had suhardi hassan in the Malaysian rider classification?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership\" WHERE \"malaysian_rider_classification\"='suhardi hassan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many drawn have points of 6 and lost by fewer than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"drawn\") FROM \"first_round\" WHERE \"points\"=6 AND \"lost\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the earliest game with a record of 23\u20136\u20134?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"regular_season\" WHERE \"record\"='23\u20136\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the earliest game with a record of 16\u20134\u20133?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"regular_season\" WHERE \"record\"='16\u20134\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W is the highest one that has a Call sign of w255bi?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='w255bi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which FCC info has a Frequency MHz of 100.7?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\"=100.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: How much Frequency MHz has a Call sign of w264bg?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"frequency_m_hz\") FROM \"translators\" WHERE \"call_sign\"='w264bg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W is the lowest one that has a Call sign of w233be?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='w233be';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which FCC info has a Frequency MHz larger than 102.3?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\">102.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_of_household_and_hand_grenade\" (\n \"task_no\" real,\n \"date_given\" text,\n \"head_of_household\" text,\n \"hand_grenade_user\" text,\n \"hand_grenade_recipient\" text\n);\n\nQuestion: What date was Rica head of household?"
},
{
"role": "assistant",
"content": "SELECT \"date_given\" FROM \"head_of_household_and_hand_grenade\" WHERE \"head_of_household\"='rica';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_of_household_and_hand_grenade\" (\n \"task_no\" real,\n \"date_given\" text,\n \"head_of_household\" text,\n \"hand_grenade_user\" text,\n \"hand_grenade_recipient\" text\n);\n\nQuestion: What is the latest task number for which Cathy is head of household?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"task_no\") FROM \"head_of_household_and_hand_grenade\" WHERE \"head_of_household\"='cathy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_of_household_and_hand_grenade\" (\n \"task_no\" real,\n \"date_given\" text,\n \"head_of_household\" text,\n \"hand_grenade_user\" text,\n \"hand_grenade_recipient\" text\n);\n\nQuestion: Who is the head of household for task number 7?"
},
{
"role": "assistant",
"content": "SELECT \"head_of_household\" FROM \"head_of_household_and_hand_grenade\" WHERE \"task_no\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_of_household_and_hand_grenade\" (\n \"task_no\" real,\n \"date_given\" text,\n \"head_of_household\" text,\n \"hand_grenade_user\" text,\n \"hand_grenade_recipient\" text\n);\n\nQuestion: Which task had Cathy as the hand grenade user?"
},
{
"role": "assistant",
"content": "SELECT \"task_no\" FROM \"head_of_household_and_hand_grenade\" WHERE \"hand_grenade_user\"='cathy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_of_household_and_hand_grenade\" (\n \"task_no\" real,\n \"date_given\" text,\n \"head_of_household\" text,\n \"hand_grenade_user\" text,\n \"hand_grenade_recipient\" text\n);\n\nQuestion: What is the task number on January 22, 2010 (day 111)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"task_no\") FROM \"head_of_household_and_hand_grenade\" WHERE \"date_given\"='january 22, 2010 (day 111)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the record in the win 7 streak?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"streak\"='win 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the score when the opponent was Detroit Pistons?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"opponent\"='detroit pistons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the date when streak was won 8?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"streak\"='won 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"intercounty_connector_bus_routes\" (\n \"route\" text,\n \"terminus\" text,\n \"operated_by\" text,\n \"corridors_served\" text,\n \"total_trips_am_pm\" text,\n \"operating_since\" text\n);\n\nQuestion: What trips are operated by Atlantic coast charters?"
},
{
"role": "assistant",
"content": "SELECT \"total_trips_am_pm\" FROM \"intercounty_connector_bus_routes\" WHERE \"operated_by\"='atlantic coast charters';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.