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_27965906_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"gt_winning_car\" text,\n \"ss_winning_car\" text,\n \"a_winning_car\" text,\n \"b_winning_car\" text,\n \"report\" text\n);\n\nQuestion: Name the total number of rnd for kim baker, bobby archer, tommy archer" }, { "role": "assistant", "content": "SELECT COUNT(\"rnd\") FROM \"table1_27965906_2\" WHERE \"ss_winning_car\"='Kim Baker, Bobby Archer, Tommy Archer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27965906_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"gt_winning_car\" text,\n \"ss_winning_car\" text,\n \"a_winning_car\" text,\n \"b_winning_car\" text,\n \"report\" text\n);\n\nQuestion: Name the total number of b winning car and bobby archer, tommy archer" }, { "role": "assistant", "content": "SELECT COUNT(\"b_winning_car\") FROM \"table1_27965906_2\" WHERE \"ss_winning_car\"='Bobby Archer, Tommy Archer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"institution\" text,\n \"city\" text,\n \"state\" text,\n \"team_name\" text,\n \"affiliation\" text,\n \"enrollment\" real,\n \"home_conference\" text\n);\n\nQuestion: How many institutes have the team name Spartans?" }, { "role": "assistant", "content": "SELECT COUNT(\"institution\") FROM \"member_schools\" WHERE \"team_name\"='Spartans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"institution\" text,\n \"city\" text,\n \"state\" text,\n \"team_name\" text,\n \"affiliation\" text,\n \"enrollment\" real,\n \"home_conference\" text\n);\n\nQuestion: How many states were there when there was an enrollment of 2789?" }, { "role": "assistant", "content": "SELECT COUNT(\"state\") FROM \"member_schools\" WHERE \"enrollment\"=2789;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"institution\" text,\n \"city\" text,\n \"state\" text,\n \"team_name\" text,\n \"affiliation\" text,\n \"enrollment\" real,\n \"home_conference\" text\n);\n\nQuestion: What kind of institute is in Indiana?" }, { "role": "assistant", "content": "SELECT \"affiliation\" FROM \"member_schools\" WHERE \"state\"='Indiana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"institution\" text,\n \"city\" text,\n \"state\" text,\n \"team_name\" text,\n \"affiliation\" text,\n \"enrollment\" real,\n \"home_conference\" text\n);\n\nQuestion: How many people enrolled for the institute with the Pioneers?" }, { "role": "assistant", "content": "SELECT MIN(\"enrollment\") FROM \"member_schools\" WHERE \"team_name\"='Pioneers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"institution\" text,\n \"city\" text,\n \"state\" text,\n \"team_name\" text,\n \"affiliation\" text,\n \"enrollment\" real,\n \"home_conference\" text\n);\n\nQuestion: What team is in the city of Rock Island?" }, { "role": "assistant", "content": "SELECT \"team_name\" FROM \"member_schools\" WHERE \"city\"='Rock Island';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the name of the episode written by alison cross?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27969432_2\" WHERE \"written_by\"='Alison Cross';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many viewers watched the episode \"the beast in me\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_in_millions\" FROM \"table1_27969432_2\" WHERE \"title\"='\\\"The Beast in Me\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many people wrote the \"the beast in me\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_27969432_2\" WHERE \"title\"='\\\"The Beast in Me\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who directed the episode written by karina csolty" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_27969432_2\" WHERE \"written_by\"='Karina Csolty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the name of the episode written by karina csolty?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27969432_2\" WHERE \"written_by\"='Karina Csolty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_4\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who directed the episode whose production code is 2m5901?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_27969432_4\" WHERE \"production\"='2M5901';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_4\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the first air date of the episode titled \"Cuts like a knife\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27969432_4\" WHERE \"title\"='\\\"Cuts Like a Knife\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_4\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many viewers in millions were there for episode 4 of this season?" }, { "role": "assistant", "content": "SELECT COUNT(\"u_s_viewers_in_millions\") FROM \"table1_27969432_4\" WHERE \"no_in_season\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_4\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the production code for the episode titled \"Love the way you lie\"?" }, { "role": "assistant", "content": "SELECT \"production\" FROM \"table1_27969432_4\" WHERE \"title\"='\\\"Love the Way You Lie\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"universities_and_colleges_ranked_by_endo\" (\n \"state_rank\" real,\n \"national_rank\" real,\n \"institution\" text,\n \"location\" text,\n \"public_or_private\" text,\n \"endowment_funds\" text,\n \"percentage_change_yoy\" text\n);\n\nQuestion: Name the total number of rank for percentage change yoy 13.1%" }, { "role": "assistant", "content": "SELECT COUNT(\"national_rank\") FROM \"universities_and_colleges_ranked_by_endo\" WHERE \"percentage_change_yoy\"='13.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"universities_and_colleges_ranked_by_endo\" (\n \"state_rank\" real,\n \"national_rank\" real,\n \"institution\" text,\n \"location\" text,\n \"public_or_private\" text,\n \"endowment_funds\" text,\n \"percentage_change_yoy\" text\n);\n\nQuestion: Name the percentage change yoy for presbyterian college" }, { "role": "assistant", "content": "SELECT \"percentage_change_yoy\" FROM \"universities_and_colleges_ranked_by_endo\" WHERE \"institution\"='Presbyterian College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"universities_and_colleges_ranked_by_endo\" (\n \"state_rank\" real,\n \"national_rank\" real,\n \"institution\" text,\n \"location\" text,\n \"public_or_private\" text,\n \"endowment_funds\" text,\n \"percentage_change_yoy\" text\n);\n\nQuestion: Name the national rank for medical university of south carolina" }, { "role": "assistant", "content": "SELECT \"national_rank\" FROM \"universities_and_colleges_ranked_by_endo\" WHERE \"institution\"='Medical University of South Carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_3\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the lowest numbered episode in the series?" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_27969432_3\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_3\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What numbered episode in the series is \"remember me\"?" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_27969432_3\" WHERE \"title\"='\\\"Remember Me\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_3\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many episodes were written by david j. north & janet tamaro?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_air_date\") FROM \"table1_27969432_3\" WHERE \"written_by\"='David J. North & Janet Tamaro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27969432_3\" (\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\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What are the original air dates for episodes directed by fred toye?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27969432_3\" WHERE \"directed_by\"='Fred Toye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: What was the aggregate score for Montauban?" }, { "role": "assistant", "content": "SELECT \"aggregate_score\" FROM \"aggregate_results\" WHERE \"proceed_to_quarter_final\"='Montauban';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: Who proceeded to the quarter finals with a points margin of 21?" }, { "role": "assistant", "content": "SELECT \"proceed_to_quarter_final\" FROM \"aggregate_results\" WHERE \"points_margin\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: What were the match points when Bordeaux-B\u00e8gles was eliminated from competition? " }, { "role": "assistant", "content": "SELECT \"match_points\" FROM \"aggregate_results\" WHERE \"eliminated_from_competition\"='Bordeaux-B\u00e8gles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987623_1\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_million\" text\n);\n\nQuestion: How many viewers saw the episode written by kevin biegel & bill lawrence?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_in_million\" FROM \"table1_27987623_1\" WHERE \"written_by\"='Kevin Biegel & Bill Lawrence';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987623_1\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_million\" text\n);\n\nQuestion: What was the episode number veiwed by 7.43 million viewers?" }, { "role": "assistant", "content": "SELECT MAX(\"series_episode\") FROM \"table1_27987623_1\" WHERE \"u_s_viewers_in_million\"='7.43';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987623_1\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_million\" text\n);\n\nQuestion: What was the title of the episode viewed by 5.03 million viewers?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27987623_1\" WHERE \"u_s_viewers_in_million\"='5.03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987623_1\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_million\" text\n);\n\nQuestion: What was the episode number for the episode viewed by 5.68 million viewers?" }, { "role": "assistant", "content": "SELECT \"season_episode\" FROM \"table1_27987623_1\" WHERE \"u_s_viewers_in_million\"='5.68';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987623_1\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_million\" text\n);\n\nQuestion: What is the episode number with a title \"baby's a rock 'n' roller\"?" }, { "role": "assistant", "content": "SELECT MIN(\"series_episode\") FROM \"table1_27987623_1\" WHERE \"title\"='\\\"Baby''s a Rock ''N'' Roller\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: How many times is the new entries this round is none?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_of_fixtures\") FROM \"calendar\" WHERE \"new_entries_this_round\"='none';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: What is the prize money when the clubs is 392 \u2192 276?" }, { "role": "assistant", "content": "SELECT \"prize_money\" FROM \"calendar\" WHERE \"clubs\"='392 \u2192 276';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: What is the lowest number of fixtures?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_fixtures\") FROM \"calendar\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: What is the main date when the round is third round qualifying?" }, { "role": "assistant", "content": "SELECT \"main_date\" FROM \"calendar\" WHERE \"round\"='Third Round Qualifying';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text,\n \"player_of_the_round\" text\n);\n\nQuestion: What is the round when the prize money is \u00a37,500?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"calendar\" WHERE \"prize_money\"='\u00a37,500';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27987768_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What number in series was the episode written by Eric Gilliland?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_27987768_1\" WHERE \"written_by\"='Eric Gilliland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"winners\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"losers\" text\n);\n\nQuestion: how many total number of points margin when brive is the winners" }, { "role": "assistant", "content": "SELECT COUNT(\"points_margin\") FROM \"aggregate_results\" WHERE \"winners\"='Brive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"winners\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"losers\" text\n);\n\nQuestion: how many match points did gran parma lost" }, { "role": "assistant", "content": "SELECT \"match_points\" FROM \"aggregate_results\" WHERE \"losers\"='Gran Parma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"winners\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"losers\" text\n);\n\nQuestion: how many match points rotherham lose" }, { "role": "assistant", "content": "SELECT \"match_points\" FROM \"aggregate_results\" WHERE \"losers\"='Rotherham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: When brive is the proceed to quarter final how many were eliminated from competition? " }, { "role": "assistant", "content": "SELECT COUNT(\"eliminated_from_competition\") FROM \"aggregate_results\" WHERE \"proceed_to_quarter_final\"='Brive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: When london irish was eliminated from competition who proceeded to quarter final?" }, { "role": "assistant", "content": "SELECT \"proceed_to_quarter_final\" FROM \"aggregate_results\" WHERE \"eliminated_from_competition\"='London Irish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: When brive proceeded to quarter final what were the match points?" }, { "role": "assistant", "content": "SELECT \"match_points\" FROM \"aggregate_results\" WHERE \"proceed_to_quarter_final\"='Brive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aggregate_results\" (\n \"proceed_to_quarter_final\" text,\n \"match_points\" text,\n \"aggregate_score\" text,\n \"points_margin\" real,\n \"eliminated_from_competition\" text\n);\n\nQuestion: When london irish was eliminated from competition who proceeded to quarter final?" }, { "role": "assistant", "content": "SELECT \"proceed_to_quarter_final\" FROM \"aggregate_results\" WHERE \"eliminated_from_competition\"='London Irish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988281_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\" real\n);\n\nQuestion: What is the production code of the episode written by Jeff Filgo?" }, { "role": "assistant", "content": "SELECT MAX(\"production_code\") FROM \"table1_27988281_1\" WHERE \"written_by\"='Jeff Filgo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988281_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\" real\n);\n\nQuestion: Who wrote the episode titled \"Red's Birthday\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_27988281_1\" WHERE \"title\"='\\\"Red''s Birthday\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988281_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\" real\n);\n\nQuestion: What is the production code of the episode titled \"Halloween\"? " }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_27988281_1\" WHERE \"title\"='\\\"Halloween\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988408_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\" real\n);\n\nQuestion: Name the original air date for bryan moore & chris peterson" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27988408_1\" WHERE \"written_by\"='Bryan Moore & Chris Peterson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988408_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\" real\n);\n\nQuestion: Name the least production code for bryan moore & chris peterson" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_27988408_1\" WHERE \"written_by\"='Bryan Moore & Chris Peterson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988408_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\" real\n);\n\nQuestion: Name who directed the episode \"babe i'm gonna leave you\"" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_27988408_1\" WHERE \"title\"='\\\"Babe I''m Gonna Leave You\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988408_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\" real\n);\n\nQuestion: Name the total number in season for \"the battle of evermore\"" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_season\") FROM \"table1_27988408_1\" WHERE \"title\"='\\\"The Battle of Evermore\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988559_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\" real\n);\n\nQuestion: How many dates did the episode with a production code of 804 originally air on?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_air_date\") FROM \"table1_27988559_1\" WHERE \"production_code\"=804;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988559_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\" real\n);\n\nQuestion: What is the original air date for \"killer queen\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27988559_1\" WHERE \"title\"='\\\"Killer Queen\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988559_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\" real\n);\n\nQuestion: Who directed episode 2 of the season?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_27988559_1\" WHERE \"no_in_season\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988559_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\" real\n);\n\nQuestion: Who wrote \"bohemian rhapsody\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_27988559_1\" WHERE \"title\"='\\\"Bohemian Rhapsody\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988559_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\" real\n);\n\nQuestion: What dat did episode 195 in the series originally air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_27988559_1\" WHERE \"no_in_series\"=195;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988540_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\" real\n);\n\nQuestion: What is the name of episode 5 in the season?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27988540_1\" WHERE \"no_in_season\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988540_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\" real\n);\n\nQuestion: Who wrote \"it's only rock and roll\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_27988540_1\" WHERE \"title\"='\\\"It''s Only Rock and Roll\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27988540_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\" real\n);\n\nQuestion: What is the title of episode 155 in the series?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_27988540_1\" WHERE \"no_in_series\"=155;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28005160_2\" (\n \"sponsored_name\" text,\n \"non_sponsored_name\" text,\n \"sponsor\" text,\n \"stadium\" text,\n \"city\" text,\n \"country\" text,\n \"sport\" text,\n \"sponsorship_ended\" real\n);\n\nQuestion: What is the last year a sponsorship ended?" }, { "role": "assistant", "content": "SELECT MAX(\"sponsorship_ended\") FROM \"table1_28005160_2\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28005160_2\" (\n \"sponsored_name\" text,\n \"non_sponsored_name\" text,\n \"sponsor\" text,\n \"stadium\" text,\n \"city\" text,\n \"country\" text,\n \"sport\" text,\n \"sponsorship_ended\" real\n);\n\nQuestion: How many countries played in the city of ljungskile?" }, { "role": "assistant", "content": "SELECT COUNT(\"country\") FROM \"table1_28005160_2\" WHERE \"city\"='Ljungskile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28005160_2\" (\n \"sponsored_name\" text,\n \"non_sponsored_name\" text,\n \"sponsor\" text,\n \"stadium\" text,\n \"city\" text,\n \"country\" text,\n \"sport\" text,\n \"sponsorship_ended\" real\n);\n\nQuestion: What cities are in sweden on this list?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"table1_28005160_2\" WHERE \"country\"='Sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28005160_2\" (\n \"sponsored_name\" text,\n \"non_sponsored_name\" text,\n \"sponsor\" text,\n \"stadium\" text,\n \"city\" text,\n \"country\" text,\n \"sport\" text,\n \"sponsorship_ended\" real\n);\n\nQuestion: What country is new orleans in?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"table1_28005160_2\" WHERE \"city\"='New Orleans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28005160_2\" (\n \"sponsored_name\" text,\n \"non_sponsored_name\" text,\n \"sponsor\" text,\n \"stadium\" text,\n \"city\" text,\n \"country\" text,\n \"sport\" text,\n \"sponsorship_ended\" real\n);\n\nQuestion: What country are the new orleans shell shockers from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"table1_28005160_2\" WHERE \"sponsored_name\"='New Orleans Shell Shockers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: What is the arrangement for bets3ab 3alia nafsy?" }, { "role": "assistant", "content": "SELECT \"arrangement\" FROM \"track_listing\" WHERE \"title\"='Bets3ab 3alia Nafsy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: Who was the composer of ain shams?" }, { "role": "assistant", "content": "SELECT \"composer\" FROM \"track_listing\" WHERE \"title\"='Ain Shams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: How many numbers are there for kam wa7ed fina?" }, { "role": "assistant", "content": "SELECT COUNT(\"no\") FROM \"track_listing\" WHERE \"title\"='Kam Wa7ed Fina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: Who was the composer of te3rafy?" }, { "role": "assistant", "content": "SELECT \"composer\" FROM \"track_listing\" WHERE \"title\"='Te3rafy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: How many sound engineers were there for law hakon '3er leek?" }, { "role": "assistant", "content": "SELECT COUNT(\"sound_engineer\") FROM \"track_listing\" WHERE \"title\"='Law Hakon ''3er Leek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"no\" real,\n \"title\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"arrangement\" text,\n \"sound_engineer\" text,\n \"length\" text\n);\n\nQuestion: Which number was the lyricist ahmed metwally?" }, { "role": "assistant", "content": "SELECT \"no\" FROM \"track_listing\" WHERE \"lyricist\"='Ahmed Metwally';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"num\" real,\n \"date\" text,\n \"opponent\" text,\n \"site_stadium\" text,\n \"score\" text,\n \"win\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: What was the site of the game that had an 11-4 score?" }, { "role": "assistant", "content": "SELECT \"site_stadium\" FROM \"schedule\" WHERE \"score\"='11-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"num\" real,\n \"date\" text,\n \"opponent\" text,\n \"site_stadium\" text,\n \"score\" text,\n \"win\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: What was the NCAA Tournament record after the June 26 game?" }, { "role": "assistant", "content": "SELECT \"ncaat_record\" FROM \"schedule\" WHERE \"date\"='June 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"num\" real,\n \"date\" text,\n \"opponent\" text,\n \"site_stadium\" text,\n \"score\" text,\n \"win\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: Who had the save in the game in which Duke (3-2) took the loss?" }, { "role": "assistant", "content": "SELECT \"save\" FROM \"schedule\" WHERE \"loss\"='Duke (3-2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"event_date\" text,\n \"event_day\" text,\n \"approx_duration\" text,\n \"starting_time\" text,\n \"event_details\" text\n);\n\nQuestion: How many event dates occurred when event details were women's sabre?" }, { "role": "assistant", "content": "SELECT COUNT(\"event_date\") FROM \"schedule\" WHERE \"event_details\"='Women''s Sabre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"event_date\" text,\n \"event_day\" text,\n \"approx_duration\" text,\n \"starting_time\" text,\n \"event_details\" text\n);\n\nQuestion: What is every value for approximate duration when event details is women's foil?" }, { "role": "assistant", "content": "SELECT \"approx_duration\" FROM \"schedule\" WHERE \"event_details\"='Women''s Foil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"event_date\" text,\n \"event_day\" text,\n \"approx_duration\" text,\n \"starting_time\" text,\n \"event_details\" text\n);\n\nQuestion: What is every event date on Sunday with a starting time of 9:30 am?" }, { "role": "assistant", "content": "SELECT \"event_date\" FROM \"schedule\" WHERE \"event_day\"='Sunday' AND \"starting_time\"='9:30 am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27994983_8\" (\n \"draw\" real,\n \"artist\" text,\n \"song_english_translation\" text,\n \"lyrics_l_music_m\" text,\n \"juries\" real,\n \"viewers\" real,\n \"total\" real,\n \"place\" real\n);\n\nQuestion: How many items appear in the viewers column when the draw is 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers\") FROM \"table1_27994983_8\" WHERE \"draw\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27994983_8\" (\n \"draw\" real,\n \"artist\" text,\n \"song_english_translation\" text,\n \"lyrics_l_music_m\" text,\n \"juries\" real,\n \"viewers\" real,\n \"total\" real,\n \"place\" real\n);\n\nQuestion: How many viewers are the when the draw is 3?" }, { "role": "assistant", "content": "SELECT MAX(\"viewers\") FROM \"table1_27994983_8\" WHERE \"draw\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27994983_8\" (\n \"draw\" real,\n \"artist\" text,\n \"song_english_translation\" text,\n \"lyrics_l_music_m\" text,\n \"juries\" real,\n \"viewers\" real,\n \"total\" real,\n \"place\" real\n);\n\nQuestion: How many juries are there when the draw is 3?" }, { "role": "assistant", "content": "SELECT MAX(\"juries\") FROM \"table1_27994983_8\" WHERE \"draw\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_27994983_8\" (\n \"draw\" real,\n \"artist\" text,\n \"song_english_translation\" text,\n \"lyrics_l_music_m\" text,\n \"juries\" real,\n \"viewers\" real,\n \"total\" real,\n \"place\" real\n);\n\nQuestion: How many juries are there for Brolle?" }, { "role": "assistant", "content": "SELECT MAX(\"juries\") FROM \"table1_27994983_8\" WHERE \"artist\"='Brolle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_districts\" (\n \"district\" text,\n \"status\" text,\n \"date_abolished\" text,\n \"former_county\" text,\n \"successor\" text\n);\n\nQuestion: What are the former counties of the Great Grimsby district?" }, { "role": "assistant", "content": "SELECT \"former_county\" FROM \"former_districts\" WHERE \"district\"='Great Grimsby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_districts\" (\n \"district\" text,\n \"status\" text,\n \"date_abolished\" text,\n \"former_county\" text,\n \"successor\" text\n);\n\nQuestion: How many statuses are there for the Durham district?" }, { "role": "assistant", "content": "SELECT COUNT(\"status\") FROM \"former_districts\" WHERE \"district\"='Durham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_districts\" (\n \"district\" text,\n \"status\" text,\n \"date_abolished\" text,\n \"former_county\" text,\n \"successor\" text\n);\n\nQuestion: What are the statuses of the districts whose successor is Wiltshire?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"former_districts\" WHERE \"successor\"='Wiltshire';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_council\" (\n \"council\" text,\n \"tuv\" real,\n \"democratic_unionist\" real,\n \"ulster_unionist\" real,\n \"alliance\" real,\n \"sdlp\" real,\n \"sinn_f_in\" real,\n \"green_ni\" real,\n \"independent\" real,\n \"others\" text,\n \"total\" real\n);\n\nQuestion: What is the SDLP of Belfast?" }, { "role": "assistant", "content": "SELECT MAX(\"sdlp\") FROM \"by_council\" WHERE \"council\"='Belfast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_council\" (\n \"council\" text,\n \"tuv\" real,\n \"democratic_unionist\" real,\n \"ulster_unionist\" real,\n \"alliance\" real,\n \"sdlp\" real,\n \"sinn_f_in\" real,\n \"green_ni\" real,\n \"independent\" real,\n \"others\" text,\n \"total\" real\n);\n\nQuestion: What is the smallest Alliance where the total is 25?" }, { "role": "assistant", "content": "SELECT MIN(\"alliance\") FROM \"by_council\" WHERE \"total\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28019988_2\" (\n \"series_num\" 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 episode that 2.93 million viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28019988_2\" WHERE \"u_s_viewers_million\"='2.93';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28019988_2\" (\n \"series_num\" 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 series number is the episode with production code bdf101?" }, { "role": "assistant", "content": "SELECT MAX(\"series_num\") FROM \"table1_28019988_2\" WHERE \"production_code\"='BDF101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28019988_2\" (\n \"series_num\" 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 series number is the episode entitled \"Booty\"?" }, { "role": "assistant", "content": "SELECT MAX(\"series_num\") FROM \"table1_28019988_2\" WHERE \"title\"='\\\"Booty\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28019988_2\" (\n \"series_num\" 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 is the series number for the episode with production code bdf109?" }, { "role": "assistant", "content": "SELECT \"series_num\" FROM \"table1_28019988_2\" WHERE \"production_code\"='BDF109';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28027307_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_millions\" text\n);\n\nQuestion: Who directed the episode with the production code of 6AKY11?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_28027307_1\" WHERE \"production_code\"='6AKY11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28027307_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_millions\" text\n);\n\nQuestion: Who wrote the episode titled \"The Feet on the Beach\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28027307_1\" WHERE \"title\"='\\\"The Feet on the Beach\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28027307_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_millions\" text\n);\n\nQuestion: What number episode in the season was titled \"The Blackout in the Blizzard\"?" }, { "role": "assistant", "content": "SELECT \"no_in_season\" FROM \"table1_28027307_1\" WHERE \"title\"='\\\"The Blackout in the Blizzard\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28027307_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_millions\" text\n);\n\nQuestion: How many millions of U.S. viewers watched the episode with the production code of 6AKY07?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_28027307_1\" WHERE \"production_code\"='6AKY07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28027307_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_millions\" text\n);\n\nQuestion: What number episode in the series was watched by 10.96 million U.S. viewers? " }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_28027307_1\" WHERE \"u_s_viewers_millions\"='10.96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2803106_1\" (\n \"week_num\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: What dance had a score total of 31?" }, { "role": "assistant", "content": "SELECT \"dance_song\" FROM \"table1_2803106_1\" WHERE \"total\"='31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2803106_1\" (\n \"week_num\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the dance that tonioli's scored an 8 and horwood scored a 6?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_2803106_1\" WHERE \"tonioli\"='8' AND \"horwood\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2803106_1\" (\n \"week_num\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: How many times did tonioli score a 9 when horwood scored a 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"table1_2803106_1\" WHERE \"tonioli\"='9' AND \"horwood\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2803106_1\" (\n \"week_num\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: On week 11 when Dixon scored an 8, what was tonioli's score?" }, { "role": "assistant", "content": "SELECT \"tonioli\" FROM \"table1_2803106_1\" WHERE \"week_num\"=11 AND \"dixon\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: How many winners from previous round were there in the semi finals?" }, { "role": "assistant", "content": "SELECT \"winners_from_previous_round\" FROM \"teams\" WHERE \"round\"='Semi finals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: What was the round that had 32 winners from previous round?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='32';" } ]