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 \"external_links\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"defeated\" text,\n \"location\" text\n);\n\nQuestion: what is the location when the champion is brigham young-hawaii, defeated is western oregon and the score is 3-0 (15-5, 15-9, 15-6)?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"external_links\" WHERE \"champion\"='brigham young-hawaii' AND \"defeated\"='western oregon' AND \"score\"='3-0 (15-5, 15-9, 15-6)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"defeated\" text,\n \"location\" text\n);\n\nQuestion: what is the year when the location is san diego, california and defeated is houston baptist (texas)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"external_links\" WHERE \"location\"='san diego, california' AND \"defeated\"='houston baptist (texas)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Operation start of 2015 has what gross mw?"
},
{
"role": "assistant",
"content": "SELECT \"gross_mw\" FROM \"units\" WHERE \"operation_start\"='2015';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Gross MW of 220, and a Unit of kakrapar 1 involves what operation start?"
},
{
"role": "assistant",
"content": "SELECT \"operation_start\" FROM \"units\" WHERE \"gross_mw\"='220' AND \"unit\"='kakrapar 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Type of phase ii has what gross mw?"
},
{
"role": "assistant",
"content": "SELECT \"gross_mw\" FROM \"units\" WHERE \"type\"='phase ii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Construction start of phase i includes what type?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"units\" WHERE \"construction_start\"='phase i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Construction start of 1 december 1984 is what unit?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"units\" WHERE \"construction_start\"='1 december 1984';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"units\" (\n \"unit\" text,\n \"type\" text,\n \"gross_mw\" text,\n \"construction_start\" text,\n \"operation_start\" text\n);\n\nQuestion: Construction start of phase ii has what operation start?"
},
{
"role": "assistant",
"content": "SELECT \"operation_start\" FROM \"units\" WHERE \"construction_start\"='phase ii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanskrit_and_pali_influence\" (\n \"value\" text,\n \"khmer\" text,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: what's the ungen for \u178f\u17d2\u179a\u17b8\u1791\u179f?"
},
{
"role": "assistant",
"content": "SELECT \"ungegn\" FROM \"sanskrit_and_pali_influence\" WHERE \"word_form\"='\u178f\u17d2\u179a\u17b8\u1791\u179f';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanskrit_and_pali_influence\" (\n \"value\" text,\n \"khmer\" text,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: what notes have the khmer \u17e2\u17e8?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"sanskrit_and_pali_influence\" WHERE \"khmer\"='\u17e2\u17e8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanskrit_and_pali_influence\" (\n \"value\" text,\n \"khmer\" text,\n \"word_form\" text,\n \"ungegn\" text,\n \"ala_lc\" text,\n \"notes\" text\n);\n\nQuestion: what's the ungegn for the \u17e1\u17e0\u17e0 khmer?"
},
{
"role": "assistant",
"content": "SELECT \"ungegn\" FROM \"sanskrit_and_pali_influence\" WHERE \"khmer\"='\u17e1\u17e0\u17e0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inhabited_territories_of_the_united_stat\" (\n \"territory\" text,\n \"abbr\" text,\n \"capital\" text,\n \"acquired\" real,\n \"territorial_status\" text,\n \"population_2010\" real,\n \"house_seat\" real\n);\n\nQuestion: What was the population of Puerto Rico in 2010?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population_2010\") FROM \"inhabited_territories_of_the_united_stat\" WHERE \"territory\"='puerto rico';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inhabited_territories_of_the_united_stat\" (\n \"territory\" text,\n \"abbr\" text,\n \"capital\" text,\n \"acquired\" real,\n \"territorial_status\" text,\n \"population_2010\" real,\n \"house_seat\" real\n);\n\nQuestion: What is the territory that was acquired past 1899 and has a capital of saipan?"
},
{
"role": "assistant",
"content": "SELECT \"territory\" FROM \"inhabited_territories_of_the_united_stat\" WHERE \"acquired\">1899 AND \"capital\"='saipan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the termination of mission for appointed by of franklin pierce"
},
{
"role": "assistant",
"content": "SELECT \"termination_of_mission\" FROM \"see_also\" WHERE \"appointed_by\"='franklin pierce';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the representative with presentation of credentials of august 16, 1928"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"see_also\" WHERE \"presentation_of_credentials\"='august 16, 1928';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the representative appointed by george w. bush with presentation of credentials 9 november 2007"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"see_also\" WHERE \"appointed_by\"='george w. bush' AND \"presentation_of_credentials\"='9 november 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the title with representative edward h. strobel"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"see_also\" WHERE \"representative\"='edward h. strobel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Country that has 600?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"money\"=600;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par that has macdonald smith as the player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='macdonald smith';"
}
]
|
[
{
"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 has t6 as a place and 75-70=145 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t6' AND \"score\"='75-70=145';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par that has jimmy hines as the player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='jimmy hines';"
}
]
|
[
{
"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 score has t3 as the place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t3';"
}
]
|
[
{
"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 place has horton smith as the player?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='horton smith';"
}
]
|
[
{
"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 place has United States as the country and Craig Wood as the player?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='craig wood';"
}
]
|
[
{
"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 \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What was the 2013 finish for the tournament that had a 2007 finish of A?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"singles_performance_timeline\" WHERE \"2007\"='a';"
}
]
|
[
{
"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 \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What was the 2012 finish in the US Open?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='us open';"
}
]
|
[
{
"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 \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament had a 2010 finish of 4R?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2010\"='4r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_championship\" (\n \"18_september_2007_19_45\" text,\n \"preston_north_end\" text,\n \"home\" text,\n \"won_2_1\" text,\n \"5_754\" real\n);\n\nQuestion: Name the 18th september 2007-19:45 with preston north end of watford"
},
{
"role": "assistant",
"content": "SELECT \"18_september_2007_19_45\" FROM \"the_championship\" WHERE \"preston_north_end\"='watford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_championship\" (\n \"18_september_2007_19_45\" text,\n \"preston_north_end\" text,\n \"home\" text,\n \"won_2_1\" text,\n \"5_754\" real\n);\n\nQuestion: Name the won 2-1 for preston north end of preston"
},
{
"role": "assistant",
"content": "SELECT \"won_2_1\" FROM \"the_championship\" WHERE \"preston_north_end\"='preston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the qualification for rank of 29 in 1957?"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"rank\"='29' AND \"year\"='1957';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place when the To par was +3 and Score was 74-73=147?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"to_par\"='+3' AND \"score\"='74-73=147';"
}
]
|
[
{
"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: When the To par is E, what is the Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"to_par\"='e';"
}
]
|
[
{
"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 was Lloyd Mangrum's Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='lloyd mangrum';"
}
]
|
[
{
"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 Dave Douglas' Place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='dave douglas';"
}
]
|
[
{
"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's Chick Harbert's To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='chick harbert';"
}
]
|
[
{
"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 United States Player has a To par of +4 and a Score of 71-77=148?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='united states' AND \"to_par\"='+4' AND \"score\"='71-77=148';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is South Korea's to par value?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"country\"='south korea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What are Tiger Woods' average earnings?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_round\" WHERE \"player\"='tiger woods';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What's the method for a record of 4-2 and round smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"record\"='4-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where's the location for the opponent James Zikic and 3 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=3 AND \"opponent\"='james zikic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_schleswig_holstein_sonderburg_g\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"spouse\" text\n);\n\nQuestion: Name the spouse for louise of hesse-kassel"
},
{
"role": "assistant",
"content": "SELECT \"spouse\" FROM \"house_of_schleswig_holstein_sonderburg_g\" WHERE \"name\"='louise of hesse-kassel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_schleswig_holstein_sonderburg_g\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"spouse\" text\n);\n\nQuestion: Name the became consort for christian ix spouse"
},
{
"role": "assistant",
"content": "SELECT \"became_consort\" FROM \"house_of_schleswig_holstein_sonderburg_g\" WHERE \"spouse\"='christian ix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_schleswig_holstein_sonderburg_g\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"spouse\" text\n);\n\nQuestion: Name the marriagefor ceased to be consort of 29 september 1898"
},
{
"role": "assistant",
"content": "SELECT \"marriage\" FROM \"house_of_schleswig_holstein_sonderburg_g\" WHERE \"ceased_to_be_consort\"='29 september 1898';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_schleswig_holstein_sonderburg_g\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"spouse\" text\n);\n\nQuestion: Tell me the name of the person married to frederick ix"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"house_of_schleswig_holstein_sonderburg_g\" WHERE \"spouse\"='frederick ix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_schleswig_holstein_sonderburg_g\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"spouse\" text\n);\n\nQuestion: Name the birth of the person married 24 may 1935"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_schleswig_holstein_sonderburg_g\" WHERE \"marriage\"='24 may 1935';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What was the rank of the player in lane 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"semifinal_2\" WHERE \"lane\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Name the average year with Laps of 6"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_24_hours_of_le_mans_results\" WHERE \"laps\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which Language has a Number of 553 633?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"language\" WHERE \"number\"='553 633';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which Males have a percentage of 0.42?"
},
{
"role": "assistant",
"content": "SELECT \"males\" FROM \"language\" WHERE \"percentage_pct\"='0.42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What's the Language with a percentage of 6.49?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"language\" WHERE \"percentage_pct\"='6.49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: What Number has a Language listed as other?"
},
{
"role": "assistant",
"content": "SELECT \"number\" FROM \"language\" WHERE \"language\"='other';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest gold count when total is more than 3, bronze less than 3, and nation of belarus with silver count more than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medals_table\" WHERE \"total\">3 AND \"bronze\"<3 AND \"nation\"='belarus' AND \"silver\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: with silver count at 0, what is the lowest bronze count?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medals_table\" WHERE \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the gold count with total less than 3 and more than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medals_table\" WHERE \"total\"<3 AND \"silver\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jdf_coast_guard\" (\n \"name_of_ship\" text,\n \"length\" text,\n \"max_speed\" text,\n \"crew_capacity\" text,\n \"class\" text,\n \"builder\" text,\n \"delivery\" real\n);\n\nQuestion: Who built the ship that is 42.8 m long and was delivered in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"jdf_coast_guard\" WHERE \"length\"='42.8 m' AND \"delivery\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was the Human Resources & Operations person between 2003-2004?"
},
{
"role": "assistant",
"content": "SELECT \"human_resources_operations\" FROM \"executive_commissioners\" WHERE \"year\"='2003-2004';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was in local affairs when the Human Resources & Operations was N. Charles Hamilton?"
},
{
"role": "assistant",
"content": "SELECT \"local_affairs\" FROM \"executive_commissioners\" WHERE \"human_resources_operations\"='n. charles hamilton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was in Human Resources & Operations when David Hornsby was in Academic & University Affairs?"
},
{
"role": "assistant",
"content": "SELECT \"human_resources_operations\" FROM \"executive_commissioners\" WHERE \"academic_university_affairs\"='david hornsby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was in external affairs when Jakki Doyle was in Human Resources & Operations?"
},
{
"role": "assistant",
"content": "SELECT \"external_affairs\" FROM \"executive_commissioners\" WHERE \"human_resources_operations\"='jakki doyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was in local affairs in 2012-2013?"
},
{
"role": "assistant",
"content": "SELECT \"local_affairs\" FROM \"executive_commissioners\" WHERE \"year\"='2012-2013';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who was in Academic & University Affairs when Andrew Langille was in local affairs?"
},
{
"role": "assistant",
"content": "SELECT \"academic_university_affairs\" FROM \"executive_commissioners\" WHERE \"local_affairs\"='andrew langille';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Perth's gold coast and Adelaide were yes when Auckland was no?"
},
{
"role": "assistant",
"content": "SELECT \"perth\" FROM \"1994\" WHERE \"gold_coast\"='yes' AND \"adelaide\"='yes' AND \"auckland\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Melbourne had a gold coast and sydney which were yes, but an adelaide that was no?"
},
{
"role": "assistant",
"content": "SELECT \"melbourne\" FROM \"1994\" WHERE \"gold_coast\"='yes' AND \"adelaide\"='no' AND \"sydney\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Adelaide's Melbourne and Perth were yes when Auckland was no?"
},
{
"role": "assistant",
"content": "SELECT \"adelaide\" FROM \"1994\" WHERE \"melbourne\"='yes' AND \"auckland\"='no' AND \"perth\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Sydney's Melbourne was no, when Auckland was yes?"
},
{
"role": "assistant",
"content": "SELECT \"sydney\" FROM \"1994\" WHERE \"melbourne\"='no' AND \"auckland\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no?"
},
{
"role": "assistant",
"content": "SELECT \"sydney\" FROM \"1994\" WHERE \"gold_coast\"='no' AND \"adelaide\"='no' AND \"melbourne\"='no' AND \"auckland\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Which Adelaide's Melbourne, Sydney, and Gold Coast were all no?"
},
{
"role": "assistant",
"content": "SELECT \"adelaide\" FROM \"1994\" WHERE \"melbourne\"='no' AND \"sydney\"='no' AND \"gold_coast\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Name the date which has type of plain stage"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"type\"='plain stage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Name the distance for Course of vittorio veneto to marina romea"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"stage_results\" WHERE \"course\"='vittorio veneto to marina romea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was the partner that played a match on a grass court?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_6_3_titles_3_runners_up\" WHERE \"surface\"='grass';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the match in which mardy fish was the partner?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_6_3_titles_3_runners_up\" WHERE \"partner\"='mardy fish';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the opponents in the match that was played on a hard court and had a runner-up outcome?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_6_3_titles_3_runners_up\" WHERE \"surface\"='hard' AND \"outcome\"='runner-up';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the time when the opponent is phil collins?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='phil collins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the total number of rounds when method is tko (punches) and time is 0:40?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (punches)' AND \"time\"='0:40';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the method when the time is 0:51?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the time when the event is bellator 89?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='bellator 89';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_rankings\" (\n \"rank\" real,\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pct_of_value\" real,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: Name the average debt as % of value for operating income more than -16 and % change on year being 62"
},
{
"role": "assistant",
"content": "SELECT AVG(\"debt_as_pct_of_value\") FROM \"2009_rankings\" WHERE \"pct_change_on_year\"='62' AND \"operating_income_m\">-16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_rankings\" (\n \"rank\" real,\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pct_of_value\" real,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: Name the country where % change on year is 21 and value is less than 86"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"2009_rankings\" WHERE \"debt_as_pct_of_value\"<86 AND \"pct_change_on_year\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_rankings\" (\n \"rank\" real,\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pct_of_value\" real,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: Name the total number of revenue for italy with team of internazionale with operating income less than 27"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"revenue_m\") FROM \"2009_rankings\" WHERE \"country\"='italy' AND \"team\"='internazionale' AND \"operating_income_m\"<27;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_rankings\" (\n \"rank\" real,\n \"team\" text,\n \"country\" text,\n \"value_m\" real,\n \"debt_as_pct_of_value\" real,\n \"pct_change_on_year\" text,\n \"revenue_m\" real,\n \"operating_income_m\" real\n);\n\nQuestion: Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"revenue_m\") FROM \"2009_rankings\" WHERE \"operating_income_m\">27 AND \"team\"='hamburg' AND \"debt_as_pct_of_value\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989_90_liverpool_f_c_season\" (\n \"round\" text,\n \"kick_off\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: What is the result for an H/A of H and a round value of R6 replay?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1989_90_liverpool_f_c_season\" WHERE \"h_a\"='h' AND \"round\"='r6 replay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1989_90_liverpool_f_c_season\" (\n \"round\" text,\n \"kick_off\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: What was the kickoff date for the round value of R4?"
},
{
"role": "assistant",
"content": "SELECT \"kick_off\" FROM \"1989_90_liverpool_f_c_season\" WHERE \"round\"='r4';"
}
]
|
[
{
"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 was Henry Picard from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='henry picard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"installations\" (\n \"name\" text,\n \"park\" text,\n \"country\" text,\n \"inversions\" real,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: Name the sum of inversions for opened of april 20, 2002"
},
{
"role": "assistant",
"content": "SELECT SUM(\"inversions\") FROM \"installations\" WHERE \"opened\"='april 20, 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"installations\" (\n \"name\" text,\n \"park\" text,\n \"country\" text,\n \"inversions\" real,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: Name the opened for spain"
},
{
"role": "assistant",
"content": "SELECT \"opened\" FROM \"installations\" WHERE \"country\"='spain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"installations\" (\n \"name\" text,\n \"park\" text,\n \"country\" text,\n \"inversions\" real,\n \"opened\" text,\n \"status\" text\n);\n\nQuestion: Name the status for six flags new england"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"installations\" WHERE \"park\"='six flags new england';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Name the to par with money of 200,000 for australia"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"money\"='200,000' AND \"country\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Name the money for ireland"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"country\"='ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Name the money for p\u00e1draig harrington"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"player\"='p\u00e1draig harrington';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Name the to par for score of 69-73-68-70=280"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='69-73-68-70=280';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Name the money for the to par of -6"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"to_par\"='-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_health_minsters\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: On what date or dates did the term with the Centre Party end?"
},
{
"role": "assistant",
"content": "SELECT \"term_end\" FROM \"list_of_health_minsters\" WHERE \"party\"='centre party';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_health_minsters\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: When did the term end for the term that had government 27 and Minister Tzachi Hanegbi?"
},
{
"role": "assistant",
"content": "SELECT \"term_end\" FROM \"list_of_health_minsters\" WHERE \"governments\"='27' AND \"minister\"='tzachi hanegbi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the location/state of the race on the Wanneroo raceway?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"circuit\"='wanneroo raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the location/state of the Launceston race?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"race_title\"='launceston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the team of winner Dick Johnson?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"winner\"='dick johnson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the race title of the Oran Park raceway circuit with team jps team bmw?"
},
{
"role": "assistant",
"content": "SELECT \"race_title\" FROM \"race_calendar\" WHERE \"team\"='jps team bmw' AND \"circuit\"='oran park raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_maryborough\" real,\n \"population_hervey_bay\" real,\n \"population_woocoo\" real,\n \"population_tiaro\" real\n);\n\nQuestion: Name the total number of population hervey bay with population woocoo less than 640 and population of maryborough less than 19,257"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_hervey_bay\") FROM \"population\" WHERE \"population_woocoo\"<640 AND \"population_maryborough\"<'19,257';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_maryborough\" real,\n \"population_hervey_bay\" real,\n \"population_woocoo\" real,\n \"population_tiaro\" real\n);\n\nQuestion: Name the average population hervey bay with population maryborough more than 11,415 and population region total less than 48,308 and population tiaro less than 2,066 and population woocoo of 491"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population_hervey_bay\") FROM \"population\" WHERE \"population_maryborough\">'11,415' AND \"population_region_total\"<'48,308' AND \"population_tiaro\"<'2,066' AND \"population_woocoo\"=491;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_maryborough\" real,\n \"population_hervey_bay\" real,\n \"population_woocoo\" real,\n \"population_tiaro\" real\n);\n\nQuestion: Name the most population hervey bay for when population maryborough of 22,977 and population tiaro less than 3,287"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population_hervey_bay\") FROM \"population\" WHERE \"population_maryborough\"='22,977' AND \"population_tiaro\"<'3,287';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.