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 \"table1_11058032_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many episodes had 16.03 million viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_series\") FROM \"table1_11058032_1\" WHERE \"u_s_viewers_millions\"='16.03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the number of interregnum for duration 3 months, 6 days?" }, { "role": "assistant", "content": "SELECT COUNT(\"interregnum_ended\") FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"duration\"='3 months, 6 days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11075747_4\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who directed Episode 8?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_11075747_4\" WHERE \"episode_num\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11075747_4\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who directed the episode called \"Tell-tale Heart\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_11075747_4\" WHERE \"title\"='\\\"Tell-Tale Heart\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11075747_4\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What was the original air date for Series 36?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_11075747_4\" WHERE \"series_num\"=36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11075747_4\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who wrote Series 38?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_11075747_4\" WHERE \"series_num\"=38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"1973_democratic_initial_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: What is the percentage for manhattan 45,901?" }, { "role": "assistant", "content": "SELECT COUNT(\"pct\") FROM \"1973\" WHERE \"manhattan\"='45,901';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"1973_democratic_initial_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: Who won the 1973 democratic initial primary for queens of 19%?" }, { "role": "assistant", "content": "SELECT \"1973_democratic_initial_primary\" FROM \"1973\" WHERE \"queens\"='19%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"1973_democratic_initial_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: What is the manhattan for richmond 35%?" }, { "role": "assistant", "content": "SELECT \"manhattan\" FROM \"1973\" WHERE \"richmond_staten_is\"='35%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"1973_democratic_initial_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: What is the queens where richmond staten is 42%?" }, { "role": "assistant", "content": "SELECT \"queens\" FROM \"1973\" WHERE \"richmond_staten_is\"='42%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1932\" (\n \"1932_before_recount\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0brooklyn\u00a0value of 51.0%" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"1932\" WHERE \"brooklyn\"='51.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1932\" (\n \"1932_before_recount\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: what's the\u00a0brooklyn\u00a0with\u00a0queens\u00a0value of 16.8%" }, { "role": "assistant", "content": "SELECT \"brooklyn\" FROM \"1932\" WHERE \"queens\"='16.8%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1932\" (\n \"1932_before_recount\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: what is the minimum total" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"1932\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1932\" (\n \"1932_before_recount\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: what's the\u00a0%\u00a0with\u00a0total\u00a0value of 249887 and\u00a0queens\u00a0value of 6.8%" }, { "role": "assistant", "content": "SELECT \"pct\" FROM \"1932\" WHERE \"total\"=249887 AND \"queens\"='6.8%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kensington_lakes_activities_association\" (\n \"team\" text,\n \"location\" text,\n \"joined\" real,\n \"conference\" text,\n \"division\" text,\n \"previous_conference\" text\n);\n\nQuestion: Which teams were in the central division and located in livonia?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"kensington_lakes_activities_association\" WHERE \"division\"='Central' AND \"location\"='Livonia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kensington_lakes_activities_association\" (\n \"team\" text,\n \"location\" text,\n \"joined\" real,\n \"conference\" text,\n \"division\" text,\n \"previous_conference\" text\n);\n\nQuestion: Which teams are located in highland township?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"kensington_lakes_activities_association\" WHERE \"location\"='Highland Township';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kensington_lakes_activities_association\" (\n \"team\" text,\n \"location\" text,\n \"joined\" real,\n \"conference\" text,\n \"division\" text,\n \"previous_conference\" text\n);\n\nQuestion: What conference was the churchill chargers team in?" }, { "role": "assistant", "content": "SELECT \"conference\" FROM \"kensington_lakes_activities_association\" WHERE \"team\"='Churchill Chargers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_7\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What was the titles of the episodes written by ken lazebnik?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_11111116_7\" WHERE \"written_by\"='Ken LaZebnik';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_7\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who directed an episode that had 2.81 million U.S. viewers?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_11111116_7\" WHERE \"u_s_viewers_million\"='2.81';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_7\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What were the names of the episodes that had 3.02 million U.S. viewers?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_11111116_7\" WHERE \"u_s_viewers_million\"='3.02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_7\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What were the original air dates of the episode named \"winds of war\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_11111116_7\" WHERE \"title\"='\\\"Winds of War\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_7\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who directed episodes that had 2.61 million U.S. viewers?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_11111116_7\" WHERE \"u_s_viewers_million\"='2.61';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_8\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of U.S. viewers watched \"Brace for Impact\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_11111116_8\" WHERE \"title\"='\\\"Brace for Impact\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_8\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of U.S. viewers watched the episode that first aired on March 31, 2013?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_11111116_8\" WHERE \"original_air_date\"='March 31, 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_8\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote the episodes that were viewed by 2.12 million viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_11111116_8\" WHERE \"u_s_viewers_million\"='2.12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_6\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: The episode written by Rebecca Dameron aired on what date? " }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_11111116_6\" WHERE \"written_by\"='Rebecca Dameron';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_6\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Which episode in the series drew 3.6 million U.S. viewers? " }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_11111116_6\" WHERE \"u_s_viewers_million\"='3.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_6\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote the episode that aired on April 17, 2011? " }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_11111116_6\" WHERE \"original_air_date\"='April 17, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_6\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many times did episode 79 originally air? " }, { "role": "assistant", "content": "SELECT COUNT(\"original_air_date\") FROM \"table1_11111116_6\" WHERE \"no_in_series\"=79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11111116_6\" (\n \"no_in_season\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of views in the country watched \"Line of Departure\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_11111116_6\" WHERE \"title\"='\\\"Line of Departure\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11148572_1\" (\n \"season\" real,\n \"mls_cup_winner\" text,\n \"mls_cup_runner_up\" text,\n \"mls_supporters_shield_winner\" text,\n \"mls_supporters_shield_runner_up\" text\n);\n\nQuestion: What is the name of the shield winner in which the mls cup winner and mls cup runner up is colorado rapids?" }, { "role": "assistant", "content": "SELECT \"mls_cup_winner\" FROM \"table1_11148572_1\" WHERE \"mls_cup_runner_up\"='Colorado Rapids';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11148572_1\" (\n \"season\" real,\n \"mls_cup_winner\" text,\n \"mls_cup_runner_up\" text,\n \"mls_supporters_shield_winner\" text,\n \"mls_supporters_shield_runner_up\" text\n);\n\nQuestion: What is the name of the shield winner in which the mls cup winner and mls supporters shield runner up is Chivas usa?" }, { "role": "assistant", "content": "SELECT \"mls_cup_winner\" FROM \"table1_11148572_1\" WHERE \"mls_supporters_shield_runner_up\"='Chivas USA';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11148572_1\" (\n \"season\" real,\n \"mls_cup_winner\" text,\n \"mls_cup_runner_up\" text,\n \"mls_supporters_shield_winner\" text,\n \"mls_supporters_shield_runner_up\" text\n);\n\nQuestion: who is the of the shield winnerin which the mls cup runner-up and mls cup winner is real salt lake?" }, { "role": "assistant", "content": "SELECT \"mls_cup_runner_up\" FROM \"table1_11148572_1\" WHERE \"mls_cup_winner\"='Real Salt Lake';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11148572_1\" (\n \"season\" real,\n \"mls_cup_winner\" text,\n \"mls_cup_runner_up\" text,\n \"mls_supporters_shield_winner\" text,\n \"mls_supporters_shield_runner_up\" text\n);\n\nQuestion: Which shield winner has the mls cup runner up and the season is 2000?" }, { "role": "assistant", "content": "SELECT \"mls_cup_runner_up\" FROM \"table1_11148572_1\" WHERE \"season\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"season\" text,\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: League apps (sub) maximum?" }, { "role": "assistant", "content": "SELECT MAX(\"league_apps_sub\") FROM \"sheffield_united_career\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"season\" text,\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: When total goals is 11 what was the league apps (sub)?" }, { "role": "assistant", "content": "SELECT MAX(\"league_apps_sub\") FROM \"sheffield_united_career\" WHERE \"total_goals\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"date\" text,\n \"first_audition_venue\" text,\n \"callback_date\" text,\n \"callback_venue\" text,\n \"golden_tickets\" real\n);\n\nQuestion: Which city had the charleston area convention center as its callback location" }, { "role": "assistant", "content": "SELECT \"audition_city\" FROM \"regional_auditions\" WHERE \"callback_venue\"='Charleston Area Convention Center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_auditions\" (\n \"episode_air_date\" text,\n \"audition_city\" text,\n \"date\" text,\n \"first_audition_venue\" text,\n \"callback_date\" text,\n \"callback_venue\" text,\n \"golden_tickets\" real\n);\n\nQuestion: When did the callbacks from rancho bernardo inn air" }, { "role": "assistant", "content": "SELECT \"episode_air_date\" FROM \"regional_auditions\" WHERE \"callback_venue\"='Rancho Bernardo Inn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11147852_1\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"year_of_affiliation\" text,\n \"owned_since\" text\n);\n\nQuestion: The station located in Albuquerque has been owned since what year?" }, { "role": "assistant", "content": "SELECT \"owned_since\" FROM \"table1_11147852_1\" WHERE \"city_of_license_market\"='Albuquerque';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11147852_1\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"year_of_affiliation\" text,\n \"owned_since\" text\n);\n\nQuestion: What channels have stations that were affiliated in 2002?" }, { "role": "assistant", "content": "SELECT \"channel_tv_dt\" FROM \"table1_11147852_1\" WHERE \"year_of_affiliation\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11147852_1\" (\n \"city_of_license_market\" text,\n \"station\" text,\n \"channel_tv_dt\" text,\n \"year_of_affiliation\" text,\n \"owned_since\" text\n);\n\nQuestion: What market is KTFK-DT in?" }, { "role": "assistant", "content": "SELECT \"city_of_license_market\" FROM \"table1_11147852_1\" WHERE \"station\"='KTFK-DT';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: what's the\u00a0engine\u00a0where\u00a0performance\u00a0is 0\u2013100km/h: 10.5s, vmax km/h (mph)" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"performance\"='0\u2013100km/h: 10.5s, VMax km/h (mph)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: what's the\u00a0turbo\u00a0where\u00a0trim\u00a0is 2.0 20v" }, { "role": "assistant", "content": "SELECT \"turbo\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"trim\"='2.0 20v';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: what's the\u00a0torque\u00a0where\u00a0performance\u00a0is 0\u2013100km/h: 7.5s auto, vmax: km/h (mph)" }, { "role": "assistant", "content": "SELECT \"torque\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"performance\"='0\u2013100km/h: 7.5s auto, VMax: km/h (mph)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: what's the\u00a0transmission\u00a0where\u00a0turbo\u00a0is yes (mitsubishi td04-16t )" }, { "role": "assistant", "content": "SELECT \"transmission\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"turbo\"='Yes (Mitsubishi TD04-16t )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: what's the\u00a0fuel delivery\u00a0where\u00a0power\u00a0is hp (kw) @6500 rpm" }, { "role": "assistant", "content": "SELECT \"fuel_delivery\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"power\"='hp (kW) @6500 rpm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volvo_850_quick_information_by_trim_leve\" (\n \"trim\" text,\n \"engine\" text,\n \"turbo\" text,\n \"fuel_delivery\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"performance\" text\n);\n\nQuestion: \" what's the engine with turbo being yes (mitsubishi td04-15g ) \"" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"volvo_850_quick_information_by_trim_leve\" WHERE \"turbo\"='Yes (Mitsubishi TD04-15g )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2007\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the english title that has finale as 33 and peak as 42?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"highest_rating_drama_series_of_2007\" WHERE \"finale\"=33 AND \"peak\"=42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2007\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the english title where the premiere is less than 30.0 and the finale is bigger than 36.0?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"highest_rating_drama_series_of_2007\" WHERE \"premiere\"<30.0 AND \"finale\">36.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2007\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the rank of the chinese title \u7de3\u4f86\u81ea\u6709\u6a5f?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"highest_rating_drama_series_of_2007\" WHERE \"chinese_title\"='\u7de3\u4f86\u81ea\u6709\u6a5f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2007\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What amount is the number of hk viewers where chinese title is \u5341\u5144\u5f1f?" }, { "role": "assistant", "content": "SELECT \"hk_viewers\" FROM \"highest_rating_drama_series_of_2007\" WHERE \"chinese_title\"='\u5341\u5144\u5f1f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the weekly rank with an air date is november 12, 2007?" }, { "role": "assistant", "content": "SELECT \"weekly_rank\" FROM \"u_s_ratings\" WHERE \"air_date\"='November 12, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the air date of the episode \"blowback\"?" }, { "role": "assistant", "content": "SELECT \"air_date\" FROM \"u_s_ratings\" WHERE \"episode\"='\\\"Blowback\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the lowest weekly rank with an air date of november 26, 2007?" }, { "role": "assistant", "content": "SELECT MIN(\"weekly_rank\") FROM \"u_s_ratings\" WHERE \"air_date\"='November 26, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the episode where 18-49 has a rating/share of 3.5/9" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"u_s_ratings\" WHERE \"18_49_rating_share\"='3.5/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the viewers where the rating is 5.3?" }, { "role": "assistant", "content": "SELECT \"viewers_m\" FROM \"u_s_ratings\" WHERE \"rating\"='5.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank\" real\n);\n\nQuestion: What is the 18-49 rating/share where the viewers is 5.61?" }, { "role": "assistant", "content": "SELECT \"18_49_rating_share\" FROM \"u_s_ratings\" WHERE \"viewers_m\"='5.61';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the highest of balmoor/" }, { "role": "assistant", "content": "SELECT \"highest\" FROM \"attendances\" WHERE \"stadium\"='Balmoor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the number of capacity at somerset park?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"attendances\" WHERE \"stadium\"='Somerset Park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the minimum capacity where airdrie united is?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"attendances\" WHERE \"team\"='Airdrie United';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the stadium for alloa athletic?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"attendances\" WHERE \"team\"='Alloa Athletic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the highest of ayr united?" }, { "role": "assistant", "content": "SELECT MIN(\"highest\") FROM \"attendances\" WHERE \"team\"='Ayr United';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the average?" }, { "role": "assistant", "content": "SELECT MIN(\"average\") FROM \"attendances\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position\" text\n);\n\nQuestion: When are team Galway's dates of appointment?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"team\"='Galway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position\" text\n);\n\nQuestion: When are the vacancy dates for outgoing manager Damien Fox?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Damien Fox';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position\" text\n);\n\nQuestion: When is the date of vacancy of Davy Fitzgerald being a replacement?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"replaced_by\"='Davy FitzGerald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position\" text\n);\n\nQuestion: Which team has the outgoing manager John Meyler?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='John Meyler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" text\n);\n\nQuestion: How many times is 3 credits 180?" }, { "role": "assistant", "content": "SELECT COUNT(\"1_credit\") FROM \"see_also\" WHERE \"3_credits\"=180;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" text\n);\n\nQuestion: What is the hand for 4 credits is 1600?" }, { "role": "assistant", "content": "SELECT \"hand\" FROM \"see_also\" WHERE \"4_credits\"=1600;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" text\n);\n\nQuestion: How many 3 credits are there with 5 credits of 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"3_credits\") FROM \"see_also\" WHERE \"5_credits\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" text\n);\n\nQuestion: How many 4 credits is the hand two pair?" }, { "role": "assistant", "content": "SELECT COUNT(\"4_credits\") FROM \"see_also\" WHERE \"hand\"='Two pair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"law_enforcement\" (\n \"character\" text,\n \"position\" text,\n \"actor\" text,\n \"first_episode\" text,\n \"final_episode\" text,\n \"duration\" text,\n \"final_episode_count\" real\n);\n\nQuestion: What duration is listed for Christian de la Fuente?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"law_enforcement\" WHERE \"actor\"='Christian de la Fuente';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"law_enforcement\" (\n \"character\" text,\n \"position\" text,\n \"actor\" text,\n \"first_episode\" text,\n \"final_episode\" text,\n \"duration\" text,\n \"final_episode_count\" real\n);\n\nQuestion: What was the final episode for Dea Agent?" }, { "role": "assistant", "content": "SELECT \"final_episode\" FROM \"law_enforcement\" WHERE \"position\"='DEA Agent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What days is greenock morton vacant?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"team\"='Greenock Morton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What are the dates of the outgoing manager colin hendry does appointments? " }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Colin Hendry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What teams does jim mcinally manage?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Jim McInally';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What days are vacant that were replaced by john brown?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"replaced_by\"='John Brown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What manner of departure is listed with an appointment date of 13 march 2008" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='13 March 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the date of appointment for outgoing manager Campbell Money" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Campbell Money';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest attendance that East End Park has ever had?" }, { "role": "assistant", "content": "SELECT MIN(\"lowest\") FROM \"attendances\" WHERE \"stadium\"='East End Park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What team plays at Palmerston Park?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"attendances\" WHERE \"stadium\"='Palmerston Park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest attandance recorded at Cappielow?" }, { "role": "assistant", "content": "SELECT MIN(\"lowest\") FROM \"attendances\" WHERE \"stadium\"='Cappielow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the highest attendance at a game played by St. Johnstone?" }, { "role": "assistant", "content": "SELECT MAX(\"highest\") FROM \"attendances\" WHERE \"team\"='St. Johnstone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What is the highest attandence at a Hamilton Academical game?" }, { "role": "assistant", "content": "SELECT MIN(\"highest\") FROM \"attendances\" WHERE \"team\"='Hamilton Academical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: who is the\u00a0champion\u00a0where\u00a0semi-finalist #2\u00a0is na and\u00a0location\u00a0is morrisville, nc" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"division_i\" WHERE \"semi_finalist_num2\"='NA' AND \"location\"='Morrisville, NC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: what's the\u00a0score\u00a0where\u00a0year\u00a0is 2007" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"division_i\" WHERE \"year\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: what is the total number of\u00a0semi-finalist #2\u00a0where\u00a0runner-up\u00a0is east carolina" }, { "role": "assistant", "content": "SELECT COUNT(\"semi_finalist_num2\") FROM \"division_i\" WHERE \"runner_up\"='East Carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: who is the\u00a0semi-finalist #1\u00a0where\u00a0runner-up\u00a0is elon university" }, { "role": "assistant", "content": "SELECT \"semi_finalist_num1\" FROM \"division_i\" WHERE \"runner_up\"='Elon University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: who is the\u00a0runner-up\u00a0where\u00a0year\u00a0is 2004 and\u00a0champion\u00a0is north carolina state" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"division_i\" WHERE \"year\"='2004' AND \"champion\"='North Carolina State';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"year\" text,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"location\" text,\n \"semi_finalist_num1\" text,\n \"semi_finalist_num2\" text\n);\n\nQuestion: who is the\u00a0runner-up\u00a0where\u00a0location\u00a0is ellenton, fl and\u00a0year\u00a0is 2004" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"division_i\" WHERE \"location\"='Ellenton, FL' AND \"year\"='2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: what's the\u00a0naturalisation by marriage\u00a0with\u00a0numer of jamaicans granted british citizenship\u00a0being 3165" }, { "role": "assistant", "content": "SELECT \"naturalisation_by_marriage\" FROM \"population_and_distribution\" WHERE \"numer_of_jamaicans_granted_british_citizenship\"=3165;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: how many\u00a0numer of jamaicans granted british citizenship\u00a0with\u00a0naturalisation by marriage\u00a0being 1060" }, { "role": "assistant", "content": "SELECT COUNT(\"numer_of_jamaicans_granted_british_citizenship\") FROM \"population_and_distribution\" WHERE \"naturalisation_by_marriage\"=1060;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: what's the\u00a0naturalisation by marriage\u00a0with\u00a0regbeingtration of a minor child\u00a0being 114" }, { "role": "assistant", "content": "SELECT \"naturalisation_by_marriage\" FROM \"population_and_distribution\" WHERE \"registration_of_a_minor_child\"=114;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: what's the\u00a0numer of jamaicans granted british citizenship\u00a0with\u00a0naturalisation by residence\u00a0being 927" }, { "role": "assistant", "content": "SELECT \"numer_of_jamaicans_granted_british_citizenship\" FROM \"population_and_distribution\" WHERE \"naturalisation_by_residence\"=927;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_and_distribution\" (\n \"year\" real,\n \"numer_of_jamaicans_granted_british_citizenship\" real,\n \"naturalisation_by_residence\" real,\n \"naturalisation_by_marriage\" real,\n \"registration_of_a_minor_child\" real,\n \"registration_by_other_means\" real\n);\n\nQuestion: what is the maximum\u00a0year\u00a0with\u00a0registration of a minor child\u00a0being 281" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"population_and_distribution\" WHERE \"registration_of_a_minor_child\"=281;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11220799_2\" (\n \"episode_titles\" text,\n \"first_air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"exiled\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: How many episodes had their first air date on March 6, 2008?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode_titles\") FROM \"table1_11220799_2\" WHERE \"first_air_date\"='March 6, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11220799_2\" (\n \"episode_titles\" text,\n \"first_air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"exiled\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: What were the results of episodes with the first air date of March 6, 2008?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"table1_11220799_2\" WHERE \"first_air_date\"='March 6, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11230937_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of viewers watched episode 15?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_11230937_2\" WHERE \"no_in_season\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11230937_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of viewers watched the \"Throwing Heat\" episode?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_11230937_2\" WHERE \"title\"='\\\"Throwing Heat\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11230937_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of viewers watched the episode directed by Anthony Hemingway?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_11230937_2\" WHERE \"directed_by\"='Anthony Hemingway';" } ]