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 \"friday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What aired at 10:00 when Flashpoint aired at 9:30?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"friday\" WHERE \"9_30\"='flashpoint';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: When Don't Forget the Lyrics aired at 8:30 what aired at 9:00?" }, { "role": "assistant", "content": "SELECT \"9_00\" FROM \"friday\" WHERE \"8_30\"='don''t forget the lyrics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What aired at 8:00 when The Goode Family aired at 8:30?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"friday\" WHERE \"8_30\"='the goode family';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: When Surviving Suburbia aired at 8:00 what aired at 10:00?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"friday\" WHERE \"8_00\"='surviving suburbia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What aired at 9:30 when Don't Forget the Lyrics aired at 8:00?" }, { "role": "assistant", "content": "SELECT \"9_30\" FROM \"friday\" WHERE \"8_00\"='don''t forget the lyrics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"completed_bridges\" (\n \"rank\" real,\n \"name\" text,\n \"span_metres\" real,\n \"span_feet\" real,\n \"material\" text,\n \"year_opened\" text,\n \"country\" text\n);\n\nQuestion: What is the lowest amount of Span metres when the year opened is 2007, the country is China, rank is less than 13, and the span feet is less than 1378?" }, { "role": "assistant", "content": "SELECT MIN(\"span_metres\") FROM \"completed_bridges\" WHERE \"year_opened\"='2007' AND \"country\"='china' AND \"rank\"<13 AND \"span_feet\"<1378;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"completed_bridges\" (\n \"rank\" real,\n \"name\" text,\n \"span_metres\" real,\n \"span_feet\" real,\n \"material\" text,\n \"year_opened\" text,\n \"country\" text\n);\n\nQuestion: Which country's material was concrete when the span metres were less than 270, span feet is more than 837, and the year opened was 1943?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"completed_bridges\" WHERE \"material\"='concrete' AND \"span_metres\"<270 AND \"span_feet\">837 AND \"year_opened\"='1943';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What country won in 1993?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What was the finish with a total larger than 286, a to par of +4 and Bob Tway played?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\">286 AND \"to_par\"='+4' AND \"player\"='bob tway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What player in the United States had a total of 286 and won in 2003?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"country\"='united states' AND \"total\"=286 AND \"year_s_won\"='2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What country has a total of 293?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\"=293;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What player is from Fiji?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"country\"='fiji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"macro_economic_trend\" (\n \"year\" real,\n \"gross_domestic_product\" real,\n \"us_dollar_exchange\" text,\n \"nominal_per_capita_gdp_as_pct_of_usa\" real,\n \"ppp_capita_gdp_as_pct_of_usa\" text\n);\n\nQuestion: What is the average year that the USD exchange of \uffe588.54 had a gross domestic product larger than 477,327,134?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"macro_economic_trend\" WHERE \"us_dollar_exchange\"='\uffe588.54' AND \"gross_domestic_product\">'477,327,134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"macro_economic_trend\" (\n \"year\" real,\n \"gross_domestic_product\" real,\n \"us_dollar_exchange\" text,\n \"nominal_per_capita_gdp_as_pct_of_usa\" real,\n \"ppp_capita_gdp_as_pct_of_usa\" text\n);\n\nQuestion: How many years did the USD Exchange have \uffe5225.82 and a gross domestic product larger than 240,707,315?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"macro_economic_trend\" WHERE \"us_dollar_exchange\"='\uffe5225.82' AND \"gross_domestic_product\">'240,707,315';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"card\" text,\n \"weight_class\" text,\n \"round\" real,\n \"time\" text,\n \"method\" text\n);\n\nQuestion: Which method was used in the welterweight class with a preliminary card?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"results\" WHERE \"weight_class\"='welterweight' AND \"card\"='preliminary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"card\" text,\n \"weight_class\" text,\n \"round\" real,\n \"time\" text,\n \"method\" text\n);\n\nQuestion: Which method was used in a round greater than 3?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"results\" WHERE \"round\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"card\" text,\n \"weight_class\" text,\n \"round\" real,\n \"time\" text,\n \"method\" text\n);\n\nQuestion: Which weight class had a time of 4:59?" }, { "role": "assistant", "content": "SELECT \"weight_class\" FROM \"results\" WHERE \"time\"='4:59';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"card\" text,\n \"weight_class\" text,\n \"round\" real,\n \"time\" text,\n \"method\" text\n);\n\nQuestion: What was the time for a round less than 3?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"results\" WHERE \"round\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"card\" text,\n \"weight_class\" text,\n \"round\" real,\n \"time\" text,\n \"method\" text\n);\n\nQuestion: What is the smallest round for the welterweight class with a preliminary card?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"results\" WHERE \"weight_class\"='welterweight' AND \"card\"='preliminary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"protocol\" text,\n \"creator\" text,\n \"license\" text,\n \"transport_layer_security\" text,\n \"bulletins_to_all_contacts\" text,\n \"batch_file_sharing\" text\n);\n\nQuestion: Were there Bulletins to all contacts of the proprietary license created by Microsoft with no transport layer of security?" }, { "role": "assistant", "content": "SELECT \"bulletins_to_all_contacts\" FROM \"see_also\" WHERE \"transport_layer_security\"='no' AND \"license\"='proprietary' AND \"creator\"='microsoft';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"protocol\" text,\n \"creator\" text,\n \"license\" text,\n \"transport_layer_security\" text,\n \"bulletins_to_all_contacts\" text,\n \"batch_file_sharing\" text\n);\n\nQuestion: Were there Bulletins to all contacts of the license created by GG Network?" }, { "role": "assistant", "content": "SELECT \"bulletins_to_all_contacts\" FROM \"see_also\" WHERE \"creator\"='gg network';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"protocol\" text,\n \"creator\" text,\n \"license\" text,\n \"transport_layer_security\" text,\n \"bulletins_to_all_contacts\" text,\n \"batch_file_sharing\" text\n);\n\nQuestion: What is the name of the license created by IETF?" }, { "role": "assistant", "content": "SELECT \"license\" FROM \"see_also\" WHERE \"creator\"='ietf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: What is the envelopment for the rhabdoviridae family?" }, { "role": "assistant", "content": "SELECT \"envelopment\" FROM \"comparison_table_of_clinically_important\" WHERE \"family\"='rhabdoviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: Which Baltimore group has a viron shape of icosahedral, replicates in the cytoplasm, is non-enveloped, and is from the astroviridae family?" }, { "role": "assistant", "content": "SELECT \"baltimore_group\" FROM \"comparison_table_of_clinically_important\" WHERE \"virion_shape\"='icosahedral' AND \"envelopment\"='non-enveloped' AND \"replication_site\"='cytoplasm' AND \"family\"='astroviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: Which Baltimore group is of the retroviridae family?" }, { "role": "assistant", "content": "SELECT \"baltimore_group\" FROM \"comparison_table_of_clinically_important\" WHERE \"family\"='retroviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: Which Baltimore group is of the togaviridae family?" }, { "role": "assistant", "content": "SELECT \"baltimore_group\" FROM \"comparison_table_of_clinically_important\" WHERE \"family\"='togaviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: Which Baltimore group is non-enveloped and is of the papillomaviridae family?" }, { "role": "assistant", "content": "SELECT \"baltimore_group\" FROM \"comparison_table_of_clinically_important\" WHERE \"envelopment\"='non-enveloped' AND \"family\"='papillomaviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_table_of_clinically_important\" (\n \"family\" text,\n \"baltimore_group\" text,\n \"envelopment\" text,\n \"virion_shape\" text,\n \"replication_site\" text\n);\n\nQuestion: What is the replication site when the species is enveloped and is of the bunyaviridae family?" }, { "role": "assistant", "content": "SELECT \"replication_site\" FROM \"comparison_table_of_clinically_important\" WHERE \"envelopment\"='enveloped' AND \"family\"='bunyaviridae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"position\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest League Cup with a Player that is steed malbranque?" }, { "role": "assistant", "content": "SELECT MAX(\"league_cup\") FROM \"most_appearances\" WHERE \"player\"='steed malbranque';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fleet_statistics\" (\n \"manufacturer\" text,\n \"model\" text,\n \"year_built\" real,\n \"vehicle_length\" text,\n \"fuel_type\" text,\n \"num_in_fleet\" real\n);\n\nQuestion: What is the Manufacturer with a Fuel Type that is diesel?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"fleet_statistics\" WHERE \"fuel_type\"='diesel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date\" text,\n \"source\" text,\n \"polling_agency\" text,\n \"davis\" text,\n \"gallagher\" text,\n \"higgins\" text,\n \"mc_guinness\" text,\n \"mitchell\" text,\n \"norris\" text,\n \"scallon\" text\n);\n\nQuestion: What is the Higgins with a Scallon that is 2%?" }, { "role": "assistant", "content": "SELECT \"higgins\" FROM \"opinion_polls\" WHERE \"scallon\"='2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date\" text,\n \"source\" text,\n \"polling_agency\" text,\n \"davis\" text,\n \"gallagher\" text,\n \"higgins\" text,\n \"mc_guinness\" text,\n \"mitchell\" text,\n \"norris\" text,\n \"scallon\" text\n);\n\nQuestion: What is the Higgins with a Davis that is 9%?" }, { "role": "assistant", "content": "SELECT \"higgins\" FROM \"opinion_polls\" WHERE \"davis\"='9%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date\" text,\n \"source\" text,\n \"polling_agency\" text,\n \"davis\" text,\n \"gallagher\" text,\n \"higgins\" text,\n \"mc_guinness\" text,\n \"mitchell\" text,\n \"norris\" text,\n \"scallon\" text\n);\n\nQuestion: What is the Source with a Norris that is 7%?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"opinion_polls\" WHERE \"norris\"='7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance\" (\n \"team\" text,\n \"game_1\" real,\n \"game_2\" real,\n \"game_3\" real,\n \"game_4\" real,\n \"game_5\" real,\n \"game_6\" text,\n \"total\" real,\n \"average\" real\n);\n\nQuestion: What is the highest total attendance of the team with a game 1 attendance of 105,011 and a game 3 greater than 102,989?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"attendance\" WHERE \"game_1\"='105,011' AND \"game_3\">'102,989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance\" (\n \"team\" text,\n \"game_1\" real,\n \"game_2\" real,\n \"game_3\" real,\n \"game_4\" real,\n \"game_5\" real,\n \"game_6\" text,\n \"total\" real,\n \"average\" real\n);\n\nQuestion: What is the average game 3 attendance of the team with a total attendance less than 524,005, a game 4 attendance of 70,585, and a game 1 attendance less than 70,585?" }, { "role": "assistant", "content": "SELECT AVG(\"game_3\") FROM \"attendance\" WHERE \"total\"<'524,005' AND \"game_4\"='70,585' AND \"game_1\"<'70,585';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance\" (\n \"team\" text,\n \"game_1\" real,\n \"game_2\" real,\n \"game_3\" real,\n \"game_4\" real,\n \"game_5\" real,\n \"game_6\" text,\n \"total\" real,\n \"average\" real\n);\n\nQuestion: What is the game 2 sum attendance of the team with a total attendance of 759,997?" }, { "role": "assistant", "content": "SELECT SUM(\"game_2\") FROM \"attendance\" WHERE \"total\"='759,997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does Barry Rose play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"player\"='barry rose';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"2006_2007_team\" text\n);\n\nQuestion: Which Jersey # has a Height (cm) of 183, a Name of paul stastny, and a Weight (kg) smaller than 93?" }, { "role": "assistant", "content": "SELECT COUNT(\"jersey_num\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\"=183 AND \"name\"='paul stastny' AND \"weight_kg\"<93;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: When the Runner-up was Angaston, and the Year was less than 1927, who was the Captain?" }, { "role": "assistant", "content": "SELECT \"captain\" FROM \"premierships\" WHERE \"year\"<1927 AND \"runner_up\"='angaston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: When the Score was kapunda 7-7-49 angaston 6-8-44, who was the Runner-up?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"premierships\" WHERE \"score\"='kapunda 7-7-49 angaston 6-8-44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Which year had a Score of kapunda 14-13-97 tanunda 5-14-44?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"premierships\" WHERE \"score\"='kapunda 14-13-97 tanunda 5-14-44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premierships\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: When the year is later than 1939 and the Runner-up is Tanunda, who is the Captain?" }, { "role": "assistant", "content": "SELECT \"captain\" FROM \"premierships\" WHERE \"runner_up\"='tanunda' AND \"year\">1939;" } ]
[ { "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 \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the tournamnet name that has a 2001 of 1r and 2011?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2001\"='1r' AND \"2011\"='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 \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2001 tournament with a 2005 4r?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"2005\"='4r';" } ]
[ { "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 \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What french open tournament happened in 2010 and has a 2004 1r?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2004\"='1r' AND \"tournament\"='french 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 \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2002 tournament has 2008 career statistics?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"singles_performance_timeline\" WHERE \"2008\"='career statistics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1971_1984\" (\n \"season\" text,\n \"staffel_a\" text,\n \"staffel_b\" text,\n \"staffel_c\" text,\n \"staffel_d\" text,\n \"staffel_e\" text\n);\n\nQuestion: Which season has a Staffel E of Stahl Riesa?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"1971_1984\" WHERE \"staffel_e\"='stahl riesa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1971_1984\" (\n \"season\" text,\n \"staffel_a\" text,\n \"staffel_b\" text,\n \"staffel_c\" text,\n \"staffel_d\" text,\n \"staffel_e\" text\n);\n\nQuestion: What is the Staffel D in the season 1983-84 with a Staffel E of Motor Suhl?" }, { "role": "assistant", "content": "SELECT \"staffel_d\" FROM \"1971_1984\" WHERE \"staffel_e\"='motor suhl' AND \"season\"='1983-84';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1971_1984\" (\n \"season\" text,\n \"staffel_a\" text,\n \"staffel_b\" text,\n \"staffel_c\" text,\n \"staffel_d\" text,\n \"staffel_e\" text\n);\n\nQuestion: What is the Staffel A that has a Staffel D of Energie Cottbus and a Staffel C of Chemie Leipzig and a Staffel B of 1. FC Union Berlin?" }, { "role": "assistant", "content": "SELECT \"staffel_a\" FROM \"1971_1984\" WHERE \"staffel_d\"='energie cottbus' AND \"staffel_c\"='chemie leipzig' AND \"staffel_b\"='1. fc union berlin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1971_1984\" (\n \"season\" text,\n \"staffel_a\" text,\n \"staffel_b\" text,\n \"staffel_c\" text,\n \"staffel_d\" text,\n \"staffel_e\" text\n);\n\nQuestion: What is the Staffel B that has Hallescher Fc Chemie as Staffel C?" }, { "role": "assistant", "content": "SELECT \"staffel_b\" FROM \"1971_1984\" WHERE \"staffel_c\"='hallescher fc chemie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which week's date was September 27, 1953?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='september 27, 1953';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the largest attendance number when the Chicago Cardinals were the opponent and the week was less than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='chicago cardinals' AND \"week\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"july\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: When Gigi Fern\u00e1ndez Natalia Zvereva 6\u20132, 6\u20131 won, who was the Tier II Runner-up?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"july\" WHERE \"tier\"='tier ii' AND \"winner\"='gigi fern\u00e1ndez natalia zvereva 6\u20132, 6\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"july\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: Who were the semi finalists when Alexia Dechaume-Balleret Sandrine testud was the runner-up?" }, { "role": "assistant", "content": "SELECT \"semi_finalists\" FROM \"july\" WHERE \"runner_up\"='alexia dechaume-balleret sandrine testud';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"july\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What tier had a runner-up of Lisa Raymond and a semifinalist of Sandrine Testud Mary Pierce?" }, { "role": "assistant", "content": "SELECT \"tier\" FROM \"july\" WHERE \"semi_finalists\"='sandrine testud mary pierce' AND \"runner_up\"='lisa raymond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"july\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: Who were the semi finalists when the runner-up was Alexandra Fusai Wiltrud Probst?" }, { "role": "assistant", "content": "SELECT \"semi_finalists\" FROM \"july\" WHERE \"runner_up\"='alexandra fusai wiltrud probst';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label that shows on april 7, 1967?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='april 7, 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Date when the Country shows uk, the Format is cd, and the Catalog of edcd 227?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"country\"='uk' AND \"format\"='cd' AND \"catalog\"='edcd 227';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Date for Catalog of lp 5060?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='lp 5060';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What Date was the Country of japan, and a Label of sony?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"country\"='japan' AND \"label\"='sony';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog with a Format of lp, a Country of us, a Label of sundazed, and a Date of 2006?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='lp' AND \"country\"='us' AND \"label\"='sundazed' AND \"date\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label name that has a Country of uk and the Catalog is bpg 62988?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='uk' AND \"catalog\"='bpg 62988';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_final\" (\n \"position\" real,\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"place\" text\n);\n\nQuestion: What were the Lyrics (l) and Music (m) for the Artist who was in a Position higher than 3 and who earned 1st Place?" }, { "role": "assistant", "content": "SELECT \"lyrics_l_music_m\" FROM \"the_final\" WHERE \"position\">3 AND \"place\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_final\" (\n \"position\" real,\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"place\" text\n);\n\nQuestion: What was the lowest Position for the Song, \"If I Can't Find My Love\"?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"the_final\" WHERE \"song\"='\\\"if i can''t find my love\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Rank of the Nation with 0 Silver and more than 1 Bronze?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"men\" WHERE \"silver\"<1 AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Total medals for the Nation with 1 Silver and 0 Golds?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"men\" WHERE \"silver\"=1 AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electrochemistry\" (\n \"element\" text,\n \"group\" real,\n \"period\" real,\n \"reaction\" text,\n \"potential\" text\n);\n\nQuestion: Which potential's period 5 is 4 and has an element of antimony?" }, { "role": "assistant", "content": "SELECT \"potential\" FROM \"electrochemistry\" WHERE \"period\"=5 AND \"element\"='antimony';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electrochemistry\" (\n \"element\" text,\n \"group\" real,\n \"period\" real,\n \"reaction\" text,\n \"potential\" text\n);\n\nQuestion: Which lowest period's element is ruthenium?" }, { "role": "assistant", "content": "SELECT MIN(\"period\") FROM \"electrochemistry\" WHERE \"element\"='ruthenium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electrochemistry\" (\n \"element\" text,\n \"group\" real,\n \"period\" real,\n \"reaction\" text,\n \"potential\" text\n);\n\nQuestion: Which highest period's element is platinum?" }, { "role": "assistant", "content": "SELECT MAX(\"period\") FROM \"electrochemistry\" WHERE \"element\"='platinum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Venue with a Result that is lost?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='lost';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the highest administrative panel with a cultural and educational panel of 2 plus an industrial and commercial panel larger than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"administrative_panel\") FROM \"composition_of_the_17th_seanad\" WHERE \"cultural_and_educational_panel\"=2 AND \"industrial_and_commercial_panel\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the total for National University of Ireland with an industrial and commercial panel less than 1, and the cultural and educational panel bigger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"national_university_of_ireland\") FROM \"composition_of_the_17th_seanad\" WHERE \"industrial_and_commercial_panel\"<1 AND \"cultural_and_educational_panel\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the administrative panel average when the cultural and educational panel is greater than 1 and the industrial and commercial panel less than 4?" }, { "role": "assistant", "content": "SELECT AVG(\"administrative_panel\") FROM \"composition_of_the_17th_seanad\" WHERE \"cultural_and_educational_panel\">1 AND \"industrial_and_commercial_panel\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the biggest administrative panel with a nominated by the Taoiseach greater than 3 and an argricultural panel of 5, plust a cultural and educational panel larger than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"administrative_panel\") FROM \"composition_of_the_17th_seanad\" WHERE \"nominated_by_the_taoiseach\">3 AND \"agricultural_panel\"=5 AND \"cultural_and_educational_panel\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest cultural and educational panel with a nominated by the Taoiseach less than 5 and the total greater than 19?" }, { "role": "assistant", "content": "SELECT MIN(\"cultural_and_educational_panel\") FROM \"composition_of_the_17th_seanad\" WHERE \"nominated_by_the_taoiseach\"<5 AND \"total\">19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_17th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: With the cultural and educational panel less than 0 what is the average industrial and commercial panel?" }, { "role": "assistant", "content": "SELECT AVG(\"industrial_and_commercial_panel\") FROM \"composition_of_the_17th_seanad\" WHERE \"cultural_and_educational_panel\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"total\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of silver medals for nations with 5 total medals and more than 3 gold medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"total\" WHERE \"total\"=5 AND \"gold\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_zealand\" (\n \"date\" real,\n \"artist\" text,\n \"label\" text,\n \"cat_num\" text,\n \"tracks\" text\n);\n\nQuestion: What was the label in 1969?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"new_zealand\" WHERE \"date\"=1969;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"commissioned\" text,\n \"builder\" text,\n \"home_port\" text,\n \"nvr_page\" text\n);\n\nQuestion: What is the Commissioned date of the ship in NVR Page MCM02?" }, { "role": "assistant", "content": "SELECT \"commissioned\" FROM \"ships\" WHERE \"nvr_page\"='mcm02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"hull_no\" text,\n \"commissioned\" text,\n \"builder\" text,\n \"home_port\" text,\n \"nvr_page\" text\n);\n\nQuestion: What is the NVR Page of the ship with a Home Port of Sasebo, Japan?" }, { "role": "assistant", "content": "SELECT \"nvr_page\" FROM \"ships\" WHERE \"home_port\"='sasebo, japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which week's game was attended by 54,015 people?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='54,015';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What date was the game that was before week 4 and was attended by over 54,015 people ?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<4 AND \"attendance\">'54,015';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"england_in_south_africa_1905_6\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: In what venues was the match with a final result of Eng by 4 wkts?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"england_in_south_africa_1905_6\" WHERE \"result\"='eng by 4 wkts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"transmissions\" (\n \"date\" text,\n \"time\" text,\n \"channel\" text,\n \"running_time\" text,\n \"notes\" text\n);\n\nQuestion: What is the running time of the transmission on bbc four channels on 23 March 2008?" }, { "role": "assistant", "content": "SELECT \"running_time\" FROM \"transmissions\" WHERE \"channel\"='bbc four' AND \"date\"='23 march 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"transmissions\" (\n \"date\" text,\n \"time\" text,\n \"channel\" text,\n \"running_time\" text,\n \"notes\" text\n);\n\nQuestion: What is the notes of the transmission on channel bbc four and a time of 22:30?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"transmissions\" WHERE \"channel\"='bbc four' AND \"time\"='22:30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"transmissions\" (\n \"date\" text,\n \"time\" text,\n \"channel\" text,\n \"running_time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time of the transmission on 28 December 2008 with a running time of 66 min 21 sec?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"transmissions\" WHERE \"running_time\"='66 min 21 sec' AND \"date\"='28 december 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"transmissions\" (\n \"date\" text,\n \"time\" text,\n \"channel\" text,\n \"running_time\" text,\n \"notes\" text\n);\n\nQuestion: Which channel was on 28 December 2008?" }, { "role": "assistant", "content": "SELECT \"channel\" FROM \"transmissions\" WHERE \"date\"='28 december 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"transmissions\" (\n \"date\" text,\n \"time\" text,\n \"channel\" text,\n \"running_time\" text,\n \"notes\" text\n);\n\nQuestion: What is the channel with a 03:40 time?" }, { "role": "assistant", "content": "SELECT \"channel\" FROM \"transmissions\" WHERE \"time\"='03:40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"league_a\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"other_b\" text,\n \"total\" text\n);\n\nQuestion: What is the Other b when the FA Cup shows 3 (17)?" }, { "role": "assistant", "content": "SELECT \"other_b\" FROM \"top_goalscorers\" WHERE \"fa_cup\"='3 (17)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"league_a\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"other_b\" text,\n \"total\" text\n);\n\nQuestion: What is the Total when the league shows 79 (221)?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"top_goalscorers\" WHERE \"league_a\"='79 (221)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"league_a\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"other_b\" text,\n \"total\" text\n);\n\nQuestion: What is the Name when the League Cup shows 0 (0), and the FA Cup is 12 (14)?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"top_goalscorers\" WHERE \"league_cup\"='0 (0)' AND \"fa_cup\"='12 (14)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"league_a\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"other_b\" text,\n \"total\" text\n);\n\nQuestion: What is the League for 1952\u20131960?" }, { "role": "assistant", "content": "SELECT \"league_a\" FROM \"top_goalscorers\" WHERE \"years\"='1952\u20131960';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"years\" text,\n \"league_a\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"other_b\" text,\n \"total\" text\n);\n\nQuestion: What shows for the League when the FA Cup is 6 (20)?" }, { "role": "assistant", "content": "SELECT \"league_a\" FROM \"top_goalscorers\" WHERE \"fa_cup\"='6 (20)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" real,\n \"player\" text,\n \"club\" text,\n \"nationality\" text,\n \"points\" real\n);\n\nQuestion: What club wast he player hristo stoitchkov from?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"results\" WHERE \"player\"='hristo stoitchkov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shopping\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the content for la sorgente sat 3?" }, { "role": "assistant", "content": "SELECT \"content\" FROM \"shopping\" WHERE \"television_service\"='la sorgente sat 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shopping\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What language is telemarket for you?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"shopping\" WHERE \"television_service\"='telemarket for you';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shopping\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What language is telemarket for you with a content of televendita?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"shopping\" WHERE \"content\"='televendita' AND \"television_service\"='telemarket for you';" } ]
[ { "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: Which team has points less than 6 in a year after 1969?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"points\"<6 AND \"year\">1969;" } ]
[ { "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: How many wins for the team with points less than 6 and a 350cc class?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"points\"<6 AND \"class\"='350cc';" } ]
[ { "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 lowest points for 36th rank?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"rank\"='36th';" } ]