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 \"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 manner of departure for the date of appointment 24 may 2010?" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='24 May 2010';" } ]
[ { "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 when the outgoing manager was mustafa denizli?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Mustafa Denizli';" } ]
[ { "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 when the date of vacancy is 15 march 2011?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='15 March 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the lowest population in which 28.0% are democrat?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"table1_27003223_4\" WHERE \"democratic\"='28.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: what is the percentage of democratic voters in which the registered voters is 67.8%?" }, { "role": "assistant", "content": "SELECT \"democratic\" FROM \"table1_27003223_4\" WHERE \"registered_voters\"='67.8%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the percentage of registered voters in which the d-r spread is +10.4%?" }, { "role": "assistant", "content": "SELECT \"registered_voters\" FROM \"table1_27003223_4\" WHERE \"d_r_spread\"='+10.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the percentage of registered voters in which the d-r spread is +14.3%?" }, { "role": "assistant", "content": "SELECT \"registered_voters\" FROM \"table1_27003223_4\" WHERE \"d_r_spread\"='+14.3%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the percentage of republican voters in which the d-r spread is -14.1%?" }, { "role": "assistant", "content": "SELECT \"republican\" FROM \"table1_27003223_4\" WHERE \"d_r_spread\"='-14.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003223_4\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the percentage of \"no party preference\" where the democratic percentage is 24.8%?" }, { "role": "assistant", "content": "SELECT \"no_party_preference\" FROM \"table1_27003223_4\" WHERE \"democratic\"='24.8%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"important_trains_passing_from_kanpur_ana\" (\n \"train_no\" real,\n \"train_name\" text,\n \"arrival\" text,\n \"departure\" text,\n \"days\" text,\n \"platform_no\" text\n);\n\nQuestion: How many trains depart at 17:30?" }, { "role": "assistant", "content": "SELECT COUNT(\"train_no\") FROM \"important_trains_passing_from_kanpur_ana\" WHERE \"departure\"='17:30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"important_trains_passing_from_kanpur_ana\" (\n \"train_no\" real,\n \"train_name\" text,\n \"arrival\" text,\n \"departure\" text,\n \"days\" text,\n \"platform_no\" text\n);\n\nQuestion: How many trains arrive at 11:00?" }, { "role": "assistant", "content": "SELECT COUNT(\"train_no\") FROM \"important_trains_passing_from_kanpur_ana\" WHERE \"arrival\"='11:00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003186_3\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the no party preference when the city is murrieta?" }, { "role": "assistant", "content": "SELECT \"no_party_preference\" FROM \"table1_27003186_3\" WHERE \"city\"='Murrieta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003186_3\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the no party preference when other is 10.1%?" }, { "role": "assistant", "content": "SELECT \"no_party_preference\" FROM \"table1_27003186_3\" WHERE \"other\"='10.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003186_3\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is the no party preference when republican is 45.3%?" }, { "role": "assistant", "content": "SELECT \"no_party_preference\" FROM \"table1_27003186_3\" WHERE \"republican\"='45.3%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003186_3\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is other when no party preference is 19.1%?" }, { "role": "assistant", "content": "SELECT \"other\" FROM \"table1_27003186_3\" WHERE \"no_party_preference\"='19.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27003186_3\" (\n \"city\" text,\n \"population\" real,\n \"registered_voters\" text,\n \"democratic\" text,\n \"republican\" text,\n \"d_r_spread\" text,\n \"other\" text,\n \"no_party_preference\" text\n);\n\nQuestion: What is other when registered voters is 50.7%?" }, { "role": "assistant", "content": "SELECT \"other\" FROM \"table1_27003186_3\" WHERE \"registered_voters\"='50.7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: What is the district with the incumbent Charlie Norwood?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"results\" WHERE \"incumbent\"='Charlie Norwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: What is the year elected for incumbent Cynthia Mckinney?" }, { "role": "assistant", "content": "SELECT \"elected\" FROM \"results\" WHERE \"incumbent\"='Cynthia McKinney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: How many incumbents were the result of sanford bishop (d) 57% joseph mccormick (r) 43%?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"results\" WHERE \"result\"='Sanford Bishop (D) 57% Joseph McCormick (R) 43%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: What is the status for district georgia's 10th?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"results\" WHERE \"district\"='Georgia''s 10th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: What is the result of districk georgia's 1st?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"results\" WHERE \"district\"='Georgia''s 1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"result\" text\n);\n\nQuestion: What is the district with the result mac collins (r) unopposed?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"results\" WHERE \"result\"='Mac Collins (R) unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_2_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: how many times is the production code is 201a?" }, { "role": "assistant", "content": "SELECT COUNT(\"title\") FROM \"aaahh_real_monsters_season_2_episodes\" WHERE \"production_code\"='201a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_by_the_world_health_organization_20\" (\n \"overall_rank\" real,\n \"country\" text,\n \"overall_life_expectancy\" real,\n \"male_life_expectancy\" real,\n \"male_rank\" real,\n \"female_life_expectancy\" real,\n \"female_rank\" real\n);\n\nQuestion: Name the most overall rank for czech republic" }, { "role": "assistant", "content": "SELECT MAX(\"overall_rank\") FROM \"list_by_the_world_health_organization_20\" WHERE \"country\"='Czech Republic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_by_the_world_health_organization_20\" (\n \"overall_rank\" real,\n \"country\" text,\n \"overall_life_expectancy\" real,\n \"male_life_expectancy\" real,\n \"male_rank\" real,\n \"female_life_expectancy\" real,\n \"female_rank\" real\n);\n\nQuestion: Name the total number of male rank for fiji" }, { "role": "assistant", "content": "SELECT COUNT(\"male_rank\") FROM \"list_by_the_world_health_organization_20\" WHERE \"country\"='Fiji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_by_the_world_health_organization_20\" (\n \"overall_rank\" real,\n \"country\" text,\n \"overall_life_expectancy\" real,\n \"male_life_expectancy\" real,\n \"male_rank\" real,\n \"female_life_expectancy\" real,\n \"female_rank\" real\n);\n\nQuestion: Name the most female life expectancy for djibouti" }, { "role": "assistant", "content": "SELECT MAX(\"female_life_expectancy\") FROM \"list_by_the_world_health_organization_20\" WHERE \"country\"='Djibouti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_by_the_world_health_organization_20\" (\n \"overall_rank\" real,\n \"country\" text,\n \"overall_life_expectancy\" real,\n \"male_life_expectancy\" real,\n \"male_rank\" real,\n \"female_life_expectancy\" real,\n \"female_rank\" real\n);\n\nQuestion: Name the most female life expectancy for overall rank of 61" }, { "role": "assistant", "content": "SELECT MAX(\"female_life_expectancy\") FROM \"list_by_the_world_health_organization_20\" WHERE \"overall_rank\"=61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_by_the_world_health_organization_20\" (\n \"overall_rank\" real,\n \"country\" text,\n \"overall_life_expectancy\" real,\n \"male_life_expectancy\" real,\n \"male_rank\" real,\n \"female_life_expectancy\" real,\n \"female_rank\" real\n);\n\nQuestion: Name the most male life expectancy for pakistan" }, { "role": "assistant", "content": "SELECT MAX(\"male_life_expectancy\") FROM \"list_by_the_world_health_organization_20\" WHERE \"country\"='Pakistan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_1_episodes\" (\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the name of episode # 10a?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"aaahh_real_monsters_season_1_episodes\" WHERE \"no_in_series\"='10a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_1_episodes\" (\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the episode number for \"Old Monster\"?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"aaahh_real_monsters_season_1_episodes\" WHERE \"title\"='\\\"Old Monster\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_1_episodes\" (\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the name of the episode written by Michael Price?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"aaahh_real_monsters_season_1_episodes\" WHERE \"written_by\"='Michael Price';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_1_episodes\" (\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who directed the episode named \"Don't just do it\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"aaahh_real_monsters_season_1_episodes\" WHERE \"title\"='\\\"Don''t Just Do It\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What was the title for the episode with the production code 404a?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"production_code\"='404a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the production code for the episode written by Kat Likkel & Denise Downer?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"written_by\"='Kat Likkel & Denise Downer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who was the director for the Episode number in season 10a?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"no_in_season\"='10a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who wrote the episode in the series 46b?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"no_in_series\"='46b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What was the production code for the episode titled \"Misery date\"?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"title\"='\\\"Misery Date\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aaahh_real_monsters_season_4_episodes\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: How many production codes did the episode number in series 46b have?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"aaahh_real_monsters_season_4_episodes\" WHERE \"no_in_series\"='46b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27047554_1\" (\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_in_millions\" text\n);\n\nQuestion: How many viewer data were given for episode \"If at First You Don't Succeed, Lie, Lie Again\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"u_s_viewers_in_millions\") FROM \"table1_27047554_1\" WHERE \"title\"='\\\"If at First You Don''t Succeed, Lie, Lie Again\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27047554_1\" (\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_in_millions\" text\n);\n\nQuestion: How many directors directed an episode that reached 2.48 million viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"directed_by\") FROM \"table1_27047554_1\" WHERE \"u_s_viewers_in_millions\"='2.48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27047554_1\" (\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_in_millions\" text\n);\n\nQuestion: What was the original air date of the episode \"Keep Your Friends Close\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27047554_1\" WHERE \"title\"='\\\"Keep Your Friends Close\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: Who represents district 41? " }, { "role": "assistant", "content": "SELECT \"delegate\" FROM \"members\" WHERE \"district\"='41';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: For delegate is mcdonough, patrick l. pat mcdonough, specify all the district." }, { "role": "assistant", "content": "SELECT \"district\" FROM \"members\" WHERE \"delegate\"='McDonough, Patrick L. Pat McDonough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: where committee is environmental matters and district is 36 please specify all the delegate name" }, { "role": "assistant", "content": "SELECT \"delegate\" FROM \"members\" WHERE \"committee\"='Environmental Matters' AND \"district\"='36';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: For democratic party, countries represented is montgomery and where committee is judiciary mention all the delegate name." }, { "role": "assistant", "content": "SELECT \"delegate\" FROM \"members\" WHERE \"committee\"='Judiciary' AND \"party\"='Democratic' AND \"counties_represented\"='Montgomery';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: Where delegate is feldman, brian j. brian j. feldman, please specify all the party" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"members\" WHERE \"delegate\"='Feldman, Brian J. Brian J. Feldman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: For delegate is gaines, tawanna p. tawanna gaines, please specify all the party." }, { "role": "assistant", "content": "SELECT \"party\" FROM \"members\" WHERE \"delegate\"='Gaines, Tawanna P. Tawanna Gaines';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"position\" real,\n \"building\" text,\n \"city\" text,\n \"height\" text,\n \"number_of_floors\" real,\n \"completion\" real\n);\n\nQuestion: If the number of floors is 70, what is the height?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"see_also\" WHERE \"number_of_floors\"=70;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"position\" real,\n \"building\" text,\n \"city\" text,\n \"height\" text,\n \"number_of_floors\" real,\n \"completion\" real\n);\n\nQuestion: if the completed is 2010, what is the number of floors?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_floors\") FROM \"see_also\" WHERE \"completion\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"position\" real,\n \"building\" text,\n \"city\" text,\n \"height\" text,\n \"number_of_floors\" real,\n \"completion\" real\n);\n\nQuestion: If the building is Costanera Center Torre 1, what is the height?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"see_also\" WHERE \"building\"='Costanera Center Torre 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"position\" real,\n \"building\" text,\n \"city\" text,\n \"height\" text,\n \"number_of_floors\" real,\n \"completion\" real\n);\n\nQuestion: How many positions does building Costanera Center Torre 1 have?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"see_also\" WHERE \"building\"='Costanera Center Torre 1';" } ]
[ { "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: Who is the outgoing manager when the team is simurq pfc?" }, { "role": "assistant", "content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"team\"='Simurq PFC';" } ]
[ { "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: How many date of appointment entries are there when the team is khazar lankaran?" }, { "role": "assistant", "content": "SELECT COUNT(\"date_of_appointment\") FROM \"managerial_changes\" WHERE \"team\"='Khazar Lankaran';" } ]
[ { "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 manner of departure when the replaced by is bahman hasanov?" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"replaced_by\"='Bahman Hasanov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: What was the overall record for the Pandas in the 2003-04 season? " }, { "role": "assistant", "content": "SELECT \"overall\" FROM \"year_by_year\" WHERE \"season\"='2003-04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: What was the conference record in the season where the Pandas had an overall record of 33-4-1?" }, { "role": "assistant", "content": "SELECT \"conf_record\" FROM \"year_by_year\" WHERE \"overall\"='33-4-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: Who was the coach of the Pandas when their overall record was 20-6-2?" }, { "role": "assistant", "content": "SELECT \"coach\" FROM \"year_by_year\" WHERE \"overall\"='20-6-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: What was the conference record for the Pandas when they were first in the standings in the 2003-04 season? " }, { "role": "assistant", "content": "SELECT \"conf_record\" FROM \"year_by_year\" WHERE \"standings\"='First' AND \"season\"='2003-04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: What was the overall record for the Pandas when their conference record was 4-1-1? " }, { "role": "assistant", "content": "SELECT \"overall\" FROM \"year_by_year\" WHERE \"conf_record\"='4-1-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"coach\" text,\n \"conf_record\" text,\n \"overall\" text,\n \"standings\" text,\n \"postseason\" text\n);\n\nQuestion: In what season was the conference record for the Pandas 15-1-1? " }, { "role": "assistant", "content": "SELECT \"season\" FROM \"year_by_year\" WHERE \"conf_record\"='15-1-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: how many times is the week # is audition?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_artist\") FROM \"performances\" WHERE \"week_num\"='Audition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: How many episodes are numbered 14 in the series?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"table1_27081956_1\" WHERE \"series_no\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: How many writers for the episode \"peace, brother\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"writer_s\") FROM \"table1_27081956_1\" WHERE \"episode\"='\\\"Peace, Brother\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: What series number is the episode \"peace, brother\"?" }, { "role": "assistant", "content": "SELECT \"series_no\" FROM \"table1_27081956_1\" WHERE \"episode\"='\\\"Peace, Brother\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: How many times did episode 17 originally air?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_airdate\") FROM \"table1_27081956_1\" WHERE \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the original air date for \"rock-a-bye-baby\"?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"table1_27081956_1\" WHERE \"episode\"='\\\"Rock-a-Bye-Baby\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27081956_1\" (\n \"episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series_whereas_series_no_refers_to_the_episodes_number_in_this_particular_series\" real,\n \"series_no\" real,\n \"episode\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the original air date(s) for \"the raid\"?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"table1_27081956_1\" WHERE \"episode\"='\\\"The Raid\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2709_4\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text,\n \"target_city_market\" text,\n \"city_of_license\" text\n);\n\nQuestion: What is the format of 105.5 fm?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"table1_2709_4\" WHERE \"frequency\"='105.5 FM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2709_4\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text,\n \"target_city_market\" text,\n \"city_of_license\" text\n);\n\nQuestion: What is the market for KLRJ?" }, { "role": "assistant", "content": "SELECT \"target_city_market\" FROM \"table1_2709_4\" WHERE \"call_sign\"='KLRJ';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2709_4\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text,\n \"target_city_market\" text,\n \"city_of_license\" text\n);\n\nQuestion: What is the format for the station owned by Dakota Broadcasting?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"table1_2709_4\" WHERE \"owner\"='Dakota Broadcasting';" } ]
[ { "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 team's manager was replaced by Ercan Ertem\u00e7\u00f6z?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"replaced_by\"='Ercan Ertem\u00e7\u00f6z';" } ]
[ { "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 was the date of appointment for the manager replacing Kadir \u00d6zcan?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Kadir \u00d6zcan';" } ]
[ { "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: Which manager was appointed on 08.06.2010?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='08.06.2010';" } ]
[ { "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: Who replaced the previous manager of Altay?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"team\"='Altay';" } ]
[ { "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 was date of appointment for Erg\u00fcn Penbe? " }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"replaced_by\"='Erg\u00fcn Penbe';" } ]
[ { "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 \"home_gms\" real,\n \"home_total\" real,\n \"home_avg\" real,\n \"top_home_crowd\" text,\n \"road_gms\" real,\n \"road_total\" real,\n \"road_avg\" real,\n \"overall_gms\" real,\n \"overall_total\" real,\n \"overall_avg\" real\n);\n\nQuestion: What is the overall total for the Omaha Nighthawks?" }, { "role": "assistant", "content": "SELECT MIN(\"overall_total\") FROM \"attendance\" WHERE \"team\"='Omaha Nighthawks';" } ]
[ { "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 \"home_gms\" real,\n \"home_total\" real,\n \"home_avg\" real,\n \"top_home_crowd\" text,\n \"road_gms\" real,\n \"road_total\" real,\n \"road_avg\" real,\n \"overall_gms\" real,\n \"overall_total\" real,\n \"overall_avg\" real\n);\n\nQuestion: Which team has the home average of 18125?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"attendance\" WHERE \"home_avg\"=18125;" } ]
[ { "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 \"home_gms\" real,\n \"home_total\" real,\n \"home_avg\" real,\n \"top_home_crowd\" text,\n \"road_gms\" real,\n \"road_total\" real,\n \"road_avg\" real,\n \"overall_gms\" real,\n \"overall_total\" real,\n \"overall_avg\" real\n);\n\nQuestion: What was the highest home total?" }, { "role": "assistant", "content": "SELECT MAX(\"home_total\") FROM \"attendance\";" } ]
[ { "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 \"home_gms\" real,\n \"home_total\" real,\n \"home_avg\" real,\n \"top_home_crowd\" text,\n \"road_gms\" real,\n \"road_total\" real,\n \"road_avg\" real,\n \"overall_gms\" real,\n \"overall_total\" real,\n \"overall_avg\" real\n);\n\nQuestion: How many games had an average of 12796?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall_gms\") FROM \"attendance\" WHERE \"overall_avg\"=12796;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who was the stage winner of the letua cycling team on stage 2? " }, { "role": "assistant", "content": "SELECT \"stage_winner\" FROM \"classification_leadership\" WHERE \"team_classification\"='LeTua Cycling Team' AND \"stage\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who is listed under points classification when the stage winner is malcolm lange? " }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"classification_leadership\" WHERE \"stage_winner\"='Malcolm Lange';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which mountains classification is listed under stage 3?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"classification_leadership\" WHERE \"stage\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who was listed under the general classification when the stage winner was suhardi hassan?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"stage_winner\"='Suhardi Hassan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: what is the greatest stage number in which suhardi hassan is the stage winner?" }, { "role": "assistant", "content": "SELECT MAX(\"stage\") FROM \"classification_leadership\" WHERE \"stage_winner\"='Suhardi Hassan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"stage_winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"asian_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who is listed under general classification on stage 4?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"stage\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27117365_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote the episodes with 7.70 u.s. viewers (million) ?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_27117365_1\" WHERE \"u_s_viewers_million\"='7.70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27117365_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What original air date has 5.85 u.s. viewers (million)?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27117365_1\" WHERE \"u_s_viewers_million\"='5.85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27117365_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What's the title in the number 10 in the season?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27117365_1\" WHERE \"no_in_season\"=10;" } ]
[ { "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_head_coach\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"position_in_table\" text,\n \"incoming_head_coach\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: If the position in table is 10th, and the manner of departure was resigned, what was the date of vacancy?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='Resigned' AND \"position_in_table\"='10th';" } ]
[ { "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_head_coach\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"position_in_table\" text,\n \"incoming_head_coach\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: If the incoming head coach is Carlos Azenha, what is the date of vacancy?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"incoming_head_coach\"='Carlos Azenha';" } ]
[ { "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_head_coach\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"position_in_table\" text,\n \"incoming_head_coach\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: If the team is uni\u00e3o de leiria, what is the date of appointment?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"team\"='Uni\u00e3o de Leiria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is 2003 when 1999 is 2.1?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"table1_27146868_1\" WHERE \"1999\"='2.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is 2010 when 2003 is 5.6?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"table1_27146868_1\" WHERE \"2003\"='5.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is the greek national account when 1997 is 6.1?" }, { "role": "assistant", "content": "SELECT \"greek_national_account\" FROM \"table1_27146868_1\" WHERE \"1997\"='6.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is 1995 when 20011 is 45.8?" }, { "role": "assistant", "content": "SELECT \"1995\" FROM \"table1_27146868_1\" WHERE \"2001_1\"='45.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is 2006 when 1997 is 6.8?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"table1_27146868_1\" WHERE \"1997\"='6.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27146868_1\" (\n \"greek_national_account\" text,\n \"1970\" text,\n \"1980\" text,\n \"1990\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001_1\" 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 \"2013_2\" text,\n \"2014_2\" text,\n \"2015_3\" text\n);\n\nQuestion: What is 2002 when 2009 is 54.0?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"table1_27146868_1\" WHERE \"2009\"='54.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"pro_team\" text,\n \"college\" text\n);\n\nQuestion: If the NFL team is the Houston Oilers and the position is DT, who is the Pro team?" }, { "role": "assistant", "content": "SELECT \"pro_team\" FROM \"third_round\" WHERE \"position\"='DT' AND \"nfl_team\"='Houston Oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"pro_team\" text,\n \"college\" text\n);\n\nQuestion: How many different players does the Washington Redskins have?" }, { "role": "assistant", "content": "SELECT COUNT(\"player\") FROM \"third_round\" WHERE \"nfl_team\"='Washington Redskins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"pro_team\" text,\n \"college\" text\n);\n\nQuestion: If the college is Vanderbilt, what is the position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"third_round\" WHERE \"college\"='Vanderbilt';" } ]