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 \"biosynthesis\" (\n \"enzyme\" text,\n \"location\" text,\n \"substrate\" text,\n \"product\" text,\n \"chromosome\" text,\n \"ec\" text,\n \"omim\" real,\n \"porphyria\" text\n);\n\nQuestion: how many porphyria have substrate \u03b4-aminolevulinic acid" }, { "role": "assistant", "content": "SELECT COUNT(\"porphyria\") FROM \"biosynthesis\" WHERE \"substrate\"='\u03b4-Aminolevulinic acid';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biosynthesis\" (\n \"enzyme\" text,\n \"location\" text,\n \"substrate\" text,\n \"product\" text,\n \"chromosome\" text,\n \"ec\" text,\n \"omim\" real,\n \"porphyria\" text\n);\n\nQuestion: give the location of subtrate coproporphyrinogen iii" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"biosynthesis\" WHERE \"substrate\"='Coproporphyrinogen III';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18274425_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 were the authors of episode having production code 3t7573?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_18274425_1\" WHERE \"production_code\"='3T7573';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18274425_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 episodes had a viewership of 2.65 million?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_season\") FROM \"table1_18274425_1\" WHERE \"u_s_viewers_millions\"='2.65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18274425_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 were the director/s of episodes written by Mike Daniels?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_18274425_1\" WHERE \"written_by\"='Mike Daniels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: How many winners of Binibining Pilipinas-International when Nina Ricci Alagao?" }, { "role": "assistant", "content": "SELECT COUNT(\"binibining_pilipinas_international\") FROM \"title_holders_from_2000_until_2010\" WHERE \"miss_universe_philippines\"='Nina Ricci Alagao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Who was second runner up when Janina San Miguel won Binibining Pilipinas-World?" }, { "role": "assistant", "content": "SELECT \"second_runner_up\" FROM \"title_holders_from_2000_until_2010\" WHERE \"binibining_pilipinas_world\"='Janina San Miguel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Who was the winner of binibining pilipinas-International wheh Gionna Cabrera won Miss Universe Philippines?" }, { "role": "assistant", "content": "SELECT \"binibining_pilipinas_international\" FROM \"title_holders_from_2000_until_2010\" WHERE \"miss_universe_philippines\"='Gionna Cabrera';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: How many winners of binibining pilipinas-International when Maria Karla Bautista won binibining pilipinas-world?" }, { "role": "assistant", "content": "SELECT COUNT(\"binibining_pilipinas_international\") FROM \"title_holders_from_2000_until_2010\" WHERE \"binibining_pilipinas_world\"='Maria Karla Bautista';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Who is the second runner up when Janina San Miguel won binibining pilipinas-world?" }, { "role": "assistant", "content": "SELECT COUNT(\"second_runner_up\") FROM \"title_holders_from_2000_until_2010\" WHERE \"binibining_pilipinas_world\"='Janina San Miguel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: When Margaret Ann Bayot won binibining pilipinas-international, how many winners of Miss Universe Philippines were there?" }, { "role": "assistant", "content": "SELECT COUNT(\"miss_universe_philippines\") FROM \"title_holders_from_2000_until_2010\" WHERE \"binibining_pilipinas_international\"='Margaret Ann Bayot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plants\" (\n \"location\" text,\n \"partner\" text,\n \"construction_start\" text,\n \"inauguration_date\" text,\n \"population_served\" real,\n \"design_flow_lpm\" real\n);\n\nQuestion: What's the minimal number of population served?" }, { "role": "assistant", "content": "SELECT MIN(\"population_served\") FROM \"plants\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plants\" (\n \"location\" text,\n \"partner\" text,\n \"construction_start\" text,\n \"inauguration_date\" text,\n \"population_served\" real,\n \"design_flow_lpm\" real\n);\n\nQuestion: Who's the partner at Tamara, Hon?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"plants\" WHERE \"location\"='Tamara, HON';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1827900_1\" (\n \"candidates\" text,\n \"votes_khuzestan\" real,\n \"pct_of_votes_khuzestan\" text,\n \"votes_nationally\" real,\n \"pct_of_votes_nationally\" text\n);\n\nQuestion: How many votes Khuzestan were there when the percentage was 34.50?" }, { "role": "assistant", "content": "SELECT MIN(\"votes_khuzestan\") FROM \"table1_1827900_1\" WHERE \"pct_of_votes_khuzestan\"='34.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1827900_1\" (\n \"candidates\" text,\n \"votes_khuzestan\" real,\n \"pct_of_votes_khuzestan\" text,\n \"votes_nationally\" real,\n \"pct_of_votes_nationally\" text\n);\n\nQuestion: How many figures for votes Khuzestan were there when the percentage was 34.50?" }, { "role": "assistant", "content": "SELECT COUNT(\"votes_khuzestan\") FROM \"table1_1827900_1\" WHERE \"pct_of_votes_khuzestan\"='34.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1827900_1\" (\n \"candidates\" text,\n \"votes_khuzestan\" real,\n \"pct_of_votes_khuzestan\" text,\n \"votes_nationally\" real,\n \"pct_of_votes_nationally\" text\n);\n\nQuestion: What was the percentage of national votes for Mahmoud Ahmadinejad?" }, { "role": "assistant", "content": "SELECT \"pct_of_votes_nationally\" FROM \"table1_1827900_1\" WHERE \"candidates\"='Mahmoud Ahmadinejad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_plc_financial_results\" (\n \"year_to_april\" real,\n \"revenue_million\" text,\n \"ebit_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share_p\" text\n);\n\nQuestion: Name the revenue for eps being 8.9" }, { "role": "assistant", "content": "SELECT \"revenue_million\" FROM \"senior_plc_financial_results\" WHERE \"earnings_per_share_p\"='8.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_plc_financial_results\" (\n \"year_to_april\" real,\n \"revenue_million\" text,\n \"ebit_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share_p\" text\n);\n\nQuestion: Name the total number of year to april for ebit being 24.5" }, { "role": "assistant", "content": "SELECT COUNT(\"year_to_april\") FROM \"senior_plc_financial_results\" WHERE \"ebit_m\"='24.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_plc_financial_results\" (\n \"year_to_april\" real,\n \"revenue_million\" text,\n \"ebit_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share_p\" text\n);\n\nQuestion: Name the eps for net profit being 39.2" }, { "role": "assistant", "content": "SELECT \"earnings_per_share_p\" FROM \"senior_plc_financial_results\" WHERE \"net_profit_m\"='39.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_plc_financial_results\" (\n \"year_to_april\" real,\n \"revenue_million\" text,\n \"ebit_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share_p\" text\n);\n\nQuestion: Name the ebit for eps being 10.6" }, { "role": "assistant", "content": "SELECT \"ebit_m\" FROM \"senior_plc_financial_results\" WHERE \"earnings_per_share_p\"='10.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"commune\" text,\n \"area_km_2\" text,\n \"2002_population\" real,\n \"pop_density_km_2\" text,\n \"municipality_website\" text\n);\n\nQuestion: What are the population densities of all communes with an are of 28.3 sq.km.?" }, { "role": "assistant", "content": "SELECT \"pop_density_km_2\" FROM \"communes\" WHERE \"area_km_2\"='28.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"commune\" text,\n \"area_km_2\" text,\n \"2002_population\" real,\n \"pop_density_km_2\" text,\n \"municipality_website\" text\n);\n\nQuestion: What commune has an area of 12.4 sq.km.?" }, { "role": "assistant", "content": "SELECT \"commune\" FROM \"communes\" WHERE \"area_km_2\"='12.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"commune\" text,\n \"area_km_2\" text,\n \"2002_population\" real,\n \"pop_density_km_2\" text,\n \"municipality_website\" text\n);\n\nQuestion: What commune had a 2002 population of 130394?" }, { "role": "assistant", "content": "SELECT \"commune\" FROM \"communes\" WHERE \"2002_population\"=130394;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"notability\" text,\n \"reason_for_seeking_refuge\" text,\n \"country\" text,\n \"city\" text,\n \"missions_country\" text,\n \"start_date\" text,\n \"end_date\" text,\n \"resolution\" text\n);\n\nQuestion: Which city has a resolution that is negotiated exile in Austria?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"references\" WHERE \"resolution\"='Negotiated exile in Austria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"notability\" text,\n \"reason_for_seeking_refuge\" text,\n \"country\" text,\n \"city\" text,\n \"missions_country\" text,\n \"start_date\" text,\n \"end_date\" text,\n \"resolution\" text\n);\n\nQuestion: Which city has the missions city of Australia?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"references\" WHERE \"missions_country\"='Australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"notability\" text,\n \"reason_for_seeking_refuge\" text,\n \"country\" text,\n \"city\" text,\n \"missions_country\" text,\n \"start_date\" text,\n \"end_date\" text,\n \"resolution\" text\n);\n\nQuestion: How many missions countries have notability with president of burundi?" }, { "role": "assistant", "content": "SELECT COUNT(\"missions_country\") FROM \"references\" WHERE \"notability\"='President of Burundi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cooperative_programs\" (\n \"team_name\" text,\n \"schools\" text,\n \"sports\" text,\n \"host\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"enrollment_2013_14\" real\n);\n\nQuestion: What is the nickname of the team whose 2013/2014 enrollment is 436? " }, { "role": "assistant", "content": "SELECT \"nickname_s\" FROM \"cooperative_programs\" WHERE \"enrollment_2013_14\"=436;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cooperative_programs\" (\n \"team_name\" text,\n \"schools\" text,\n \"sports\" text,\n \"host\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"enrollment_2013_14\" real\n);\n\nQuestion: What is the name of the team from the Elverado Trico school in football? " }, { "role": "assistant", "content": "SELECT \"team_name\" FROM \"cooperative_programs\" WHERE \"sports\"='Football' AND \"schools\"='Elverado Trico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cantonal_school_systems\" (\n \"canton\" text,\n \"years_of_kindergarten\" real,\n \"years_of_kindergarten_provided\" text,\n \"years_of_kindergarten_legally_required\" text,\n \"length_of_primary_school\" real,\n \"length_of_mandatory_secondary_school\" real,\n \"separate_secondary_schools\" text,\n \"cooperative_secondary_schools\" text,\n \"integrated_secondary_schools\" text\n);\n\nQuestion: How many years of kindergarten is provided in Ticino?" }, { "role": "assistant", "content": "SELECT \"years_of_kindergarten_provided\" FROM \"cantonal_school_systems\" WHERE \"canton\"='Ticino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cantonal_school_systems\" (\n \"canton\" text,\n \"years_of_kindergarten\" real,\n \"years_of_kindergarten_provided\" text,\n \"years_of_kindergarten_legally_required\" text,\n \"length_of_primary_school\" real,\n \"length_of_mandatory_secondary_school\" real,\n \"separate_secondary_schools\" text,\n \"cooperative_secondary_schools\" text,\n \"integrated_secondary_schools\" text\n);\n\nQuestion: How many years is kindergarten legally requited in Zug?" }, { "role": "assistant", "content": "SELECT \"years_of_kindergarten_legally_required\" FROM \"cantonal_school_systems\" WHERE \"canton\"='Zug';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cantonal_school_systems\" (\n \"canton\" text,\n \"years_of_kindergarten\" real,\n \"years_of_kindergarten_provided\" text,\n \"years_of_kindergarten_legally_required\" text,\n \"length_of_primary_school\" real,\n \"length_of_mandatory_secondary_school\" real,\n \"separate_secondary_schools\" text,\n \"cooperative_secondary_schools\" text,\n \"integrated_secondary_schools\" text\n);\n\nQuestion: Are there integrated secondary schools in Uri?" }, { "role": "assistant", "content": "SELECT \"integrated_secondary_schools\" FROM \"cantonal_school_systems\" WHERE \"canton\"='Uri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cantonal_school_systems\" (\n \"canton\" text,\n \"years_of_kindergarten\" real,\n \"years_of_kindergarten_provided\" text,\n \"years_of_kindergarten_legally_required\" text,\n \"length_of_primary_school\" real,\n \"length_of_mandatory_secondary_school\" real,\n \"separate_secondary_schools\" text,\n \"cooperative_secondary_schools\" text,\n \"integrated_secondary_schools\" text\n);\n\nQuestion: What is the longest length of mandatory secondary school?" }, { "role": "assistant", "content": "SELECT MAX(\"length_of_mandatory_secondary_school\") FROM \"cantonal_school_systems\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cantonal_school_systems\" (\n \"canton\" text,\n \"years_of_kindergarten\" real,\n \"years_of_kindergarten_provided\" text,\n \"years_of_kindergarten_legally_required\" text,\n \"length_of_primary_school\" real,\n \"length_of_mandatory_secondary_school\" real,\n \"separate_secondary_schools\" text,\n \"cooperative_secondary_schools\" text,\n \"integrated_secondary_schools\" text\n);\n\nQuestion: Are there integrated secondary schools in Basel-Stadt?" }, { "role": "assistant", "content": "SELECT \"integrated_secondary_schools\" FROM \"cantonal_school_systems\" WHERE \"canton\"='Basel-Stadt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18305523_2\" (\n \"num\" real,\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"artist_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text,\n \"editor_s\" text,\n \"comments\" text\n);\n\nQuestion: Who wrote the story that is cover date 19 October 1985?" }, { "role": "assistant", "content": "SELECT \"writer_s\" FROM \"table1_18305523_2\" WHERE \"cover_date\"='19 October 1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18305523_2\" (\n \"num\" real,\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"artist_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text,\n \"editor_s\" text,\n \"comments\" text\n);\n\nQuestion: How many cover dates does the story \"Devastation Derby! (part 1)\" have?" }, { "role": "assistant", "content": "SELECT COUNT(\"cover_date\") FROM \"table1_18305523_2\" WHERE \"story_title\"='DEVASTATION DERBY! (Part 1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18305523_2\" (\n \"num\" real,\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"artist_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text,\n \"editor_s\" text,\n \"comments\" text\n);\n\nQuestion: What is the comment on the issue dated 14 March 1987?" }, { "role": "assistant", "content": "SELECT \"comments\" FROM \"table1_18305523_2\" WHERE \"cover_date\"='14 March 1987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18305523_2\" (\n \"num\" real,\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"artist_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text,\n \"editor_s\" text,\n \"comments\" text\n);\n\nQuestion: What is the title of the issue where the art was done by Barry Kitson and Farmer?" }, { "role": "assistant", "content": "SELECT \"story_title\" FROM \"table1_18305523_2\" WHERE \"artist_s\"='Barry Kitson and Farmer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18305523_1\" (\n \"num\" real,\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"artist_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text,\n \"editor_s\" text,\n \"comments\" text\n);\n\nQuestion: What is the minimum number which is for title The Enemy Within part 1?" }, { "role": "assistant", "content": "SELECT MIN(\"num\") FROM \"table1_18305523_1\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"food_sources\" (\n \"foodstuff\" text,\n \"pinoresinol\" real,\n \"syringaresinol\" real,\n \"sesamin\" text,\n \"lariciresinol\" real,\n \"secoisolariciresinol\" real,\n \"matairesinol\" real,\n \"hydroxymatairesinol\" real\n);\n\nQuestion: what is the number of hydroxymatairesinol where sesamin is 62724?" }, { "role": "assistant", "content": "SELECT \"hydroxymatairesinol\" FROM \"food_sources\" WHERE \"sesamin\"='62724';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"food_sources\" (\n \"foodstuff\" text,\n \"pinoresinol\" real,\n \"syringaresinol\" real,\n \"sesamin\" text,\n \"lariciresinol\" real,\n \"secoisolariciresinol\" real,\n \"matairesinol\" real,\n \"hydroxymatairesinol\" real\n);\n\nQuestion: what is the total number of sesamin were secoisolariciresinol is 240?" }, { "role": "assistant", "content": "SELECT \"sesamin\" FROM \"food_sources\" WHERE \"secoisolariciresinol\"=240;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"food_sources\" (\n \"foodstuff\" text,\n \"pinoresinol\" real,\n \"syringaresinol\" real,\n \"sesamin\" text,\n \"lariciresinol\" real,\n \"secoisolariciresinol\" real,\n \"matairesinol\" real,\n \"hydroxymatairesinol\" real\n);\n\nQuestion: what is the maximum number of pinorinol in wheat bran?" }, { "role": "assistant", "content": "SELECT MAX(\"pinoresinol\") FROM \"food_sources\" WHERE \"foodstuff\"='Wheat bran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"food_sources\" (\n \"foodstuff\" text,\n \"pinoresinol\" real,\n \"syringaresinol\" real,\n \"sesamin\" text,\n \"lariciresinol\" real,\n \"secoisolariciresinol\" real,\n \"matairesinol\" real,\n \"hydroxymatairesinol\" real\n);\n\nQuestion: how much sesamin is in sesame seed?" }, { "role": "assistant", "content": "SELECT \"sesamin\" FROM \"food_sources\" WHERE \"foodstuff\"='Sesame seed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"food_sources\" (\n \"foodstuff\" text,\n \"pinoresinol\" real,\n \"syringaresinol\" real,\n \"sesamin\" text,\n \"lariciresinol\" real,\n \"secoisolariciresinol\" real,\n \"matairesinol\" real,\n \"hydroxymatairesinol\" real\n);\n\nQuestion: what is the minimum number is lariciresinol where matairesinol number is 440?" }, { "role": "assistant", "content": "SELECT MIN(\"lariciresinol\") FROM \"food_sources\" WHERE \"matairesinol\"=440;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the calling for the 18.42 arrival time?" }, { "role": "assistant", "content": "SELECT \"calling_at\" FROM \"table1_18332845_2\" WHERE \"arrival\"='18.42';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the arrival for Wansford, Peterborough East?" }, { "role": "assistant", "content": "SELECT \"arrival\" FROM \"table1_18332845_2\" WHERE \"calling_at\"='Wansford, Peterborough East';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the departure time when the arrival was 14.40?" }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18332845_2\" WHERE \"arrival\"='14.40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What is the departure for Peterborough East whose arrival time is 12.40?" }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18332845_2\" WHERE \"going_to\"='Peterborough East' AND \"arrival\"='12.40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What is the calling at for the 09.50 departure?" }, { "role": "assistant", "content": "SELECT \"calling_at\" FROM \"table1_18332845_2\" WHERE \"departure\"='09.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18332845_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: Where is the train going to when departing at 20.35?" }, { "role": "assistant", "content": "SELECT \"going_to\" FROM \"table1_18332845_2\" WHERE \"departure\"='20.35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"lwat\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: Name the most played for 140 plus is 13" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"statistics\" WHERE \"140\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"lwat\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: Name the 3 dart average for michael van gerwen" }, { "role": "assistant", "content": "SELECT \"3_dart_average\" FROM \"statistics\" WHERE \"player\"='Michael van Gerwen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18333678_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: how many callings of trains arriving at 09.06" }, { "role": "assistant", "content": "SELECT COUNT(\"calling_at\") FROM \"table1_18333678_2\" WHERE \"arrival\"='09.06';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18333678_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: what is the operator of trains arriving at 13.39 " }, { "role": "assistant", "content": "SELECT \"operator\" FROM \"table1_18333678_2\" WHERE \"arrival\"='13.39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18333678_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: when does the train departuring at 11.35 arrive" }, { "role": "assistant", "content": "SELECT \"arrival\" FROM \"table1_18333678_2\" WHERE \"departure\"='11.35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18333678_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: when does the train arriving at bourne at 11.45 departure " }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18333678_2\" WHERE \"going_to\"='Bourne' AND \"arrival\"='11.45';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18333678_2\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: when does the train arriving at stamford east at 11.45 departure " }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18333678_2\" WHERE \"arrival\"='11.45' AND \"going_to\"='Stamford East';" } ]
[ { "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 clubs are remaining when the winners from the previous round totals 4?" }, { "role": "assistant", "content": "SELECT \"clubs_remaining\" FROM \"teams\" WHERE \"winners_from_previous_round\"='4';" } ]
[ { "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 is the round where winners from the previous round totals 8?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='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 clubs remain in the fourth round?" }, { "role": "assistant", "content": "SELECT MIN(\"clubs_remaining\") FROM \"teams\" WHERE \"round\"='Fourth round';" } ]
[ { "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 new entries started in the round where winners from the previous round is 32?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='32';" } ]
[ { "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 new entries started in the quarter finals?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"teams\" WHERE \"round\"='Quarter 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: How many new entries started in the round where winners from the previous round is 16?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18335117_4\" (\n \"no_overall\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"director\" text,\n \"writer\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote \"episode 10\"?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"table1_18335117_4\" WHERE \"title\"='\\\"Episode 10\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18335117_4\" (\n \"no_overall\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"director\" text,\n \"writer\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote \"episode 4\"?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"table1_18335117_4\" WHERE \"title\"='\\\"Episode 4\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18335117_4\" (\n \"no_overall\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"director\" text,\n \"writer\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who directed \"episode 5\"?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"table1_18335117_4\" WHERE \"title\"='\\\"Episode 5\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: Who was the train operator when the train departed at 11.02 in 1922?" }, { "role": "assistant", "content": "SELECT \"operator\" FROM \"table1_18365784_3\" WHERE \"departure\"='11.02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the train destination when it has a calling at Boston, Sleaford, Nottingham Victoria?" }, { "role": "assistant", "content": "SELECT \"going_to\" FROM \"table1_18365784_3\" WHERE \"calling_at\"='Boston, Sleaford, Nottingham Victoria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the departure time of the train going to Boston?" }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18365784_3\" WHERE \"going_to\"='Boston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the arrival time of the train that departed at 18.16?" }, { "role": "assistant", "content": "SELECT \"arrival\" FROM \"table1_18365784_3\" WHERE \"departure\"='18.16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the departure time of the train that arrived at 21.26?" }, { "role": "assistant", "content": "SELECT \"departure\" FROM \"table1_18365784_3\" WHERE \"arrival\"='21.26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18365784_3\" (\n \"departure\" text,\n \"going_to\" text,\n \"calling_at\" text,\n \"arrival\" text,\n \"operator\" text\n);\n\nQuestion: What was the 'calling at' station of the train that departed on 18.16?" }, { "role": "assistant", "content": "SELECT \"calling_at\" FROM \"table1_18365784_3\" WHERE \"departure\"='18.16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18335117_5\" (\n \"no_overall\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"director\" text,\n \"writer\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the original air date for barnaby southcomb for charlie martin" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_18335117_5\" WHERE \"director\"='Barnaby Southcomb' AND \"writer\"='Charlie Martin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18335117_5\" (\n \"no_overall\" real,\n \"no_in_series\" real,\n \"title\" text,\n \"director\" text,\n \"writer\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the number in series for number 38" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_18335117_5\" WHERE \"no_overall\"=38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18367694_2\" (\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 is the original air date of the episode with the production code 1115? " }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_18367694_2\" WHERE \"production_code\"=1115;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18367694_2\" (\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: who directed the episode with the original air date of November 22, 1989? " }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_18367694_2\" WHERE \"original_air_date\"='November 22, 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida_league_alumni_top_5_round_picks_\" (\n \"player\" text,\n \"fcsl_team\" text,\n \"years_played\" text,\n \"year_drafted\" real,\n \"round\" text,\n \"mlb_team\" text\n);\n\nQuestion: when deland is the fcsl team and 2008 is the year played who is the mlb team?" }, { "role": "assistant", "content": "SELECT \"mlb_team\" FROM \"florida_league_alumni_top_5_round_picks_\" WHERE \"years_played\"='2008' AND \"fcsl_team\"='DeLand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida_league_alumni_top_5_round_picks_\" (\n \"player\" text,\n \"fcsl_team\" text,\n \"years_played\" text,\n \"year_drafted\" real,\n \"round\" text,\n \"mlb_team\" text\n);\n\nQuestion: When toronto blue jays are the mlb team who are the fscl team?" }, { "role": "assistant", "content": "SELECT \"fcsl_team\" FROM \"florida_league_alumni_top_5_round_picks_\" WHERE \"mlb_team\"='Toronto Blue Jays';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida_league_alumni_top_5_round_picks_\" (\n \"player\" text,\n \"fcsl_team\" text,\n \"years_played\" text,\n \"year_drafted\" real,\n \"round\" text,\n \"mlb_team\" text\n);\n\nQuestion: When 2005 is the year played what is the lowest year drafted?" }, { "role": "assistant", "content": "SELECT MIN(\"year_drafted\") FROM \"florida_league_alumni_top_5_round_picks_\" WHERE \"years_played\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida_league_alumni_top_5_round_picks_\" (\n \"player\" text,\n \"fcsl_team\" text,\n \"years_played\" text,\n \"year_drafted\" real,\n \"round\" text,\n \"mlb_team\" text\n);\n\nQuestion: When winter pines is the fcsl team how many mlb teams are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"mlb_team\") FROM \"florida_league_alumni_top_5_round_picks_\" WHERE \"fcsl_team\"='Winter Pines';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida_league_alumni_top_5_round_picks_\" (\n \"player\" text,\n \"fcsl_team\" text,\n \"years_played\" text,\n \"year_drafted\" real,\n \"round\" text,\n \"mlb_team\" text\n);\n\nQuestion: When 2006 is the year played and winter park is the fcsl team who is the player?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"florida_league_alumni_top_5_round_picks_\" WHERE \"fcsl_team\"='Winter Park' AND \"years_played\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1837570_1\" (\n \"frequency_in_kuala_lumpur_selangor_putrajaya_and_environs\" text,\n \"station\" text,\n \"operator\" text,\n \"language\" text,\n \"genre\" text,\n \"coverage_area\" text\n);\n\nQuestion: Which operators offer a genre of music?" }, { "role": "assistant", "content": "SELECT \"operator\" FROM \"table1_1837570_1\" WHERE \"genre\"='music';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1837570_1\" (\n \"frequency_in_kuala_lumpur_selangor_putrajaya_and_environs\" text,\n \"station\" text,\n \"operator\" text,\n \"language\" text,\n \"genre\" text,\n \"coverage_area\" text\n);\n\nQuestion: Which languages are offered in the coverage area of klang petaling jaya shah alam?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"table1_1837570_1\" WHERE \"coverage_area\"='Klang Petaling Jaya Shah Alam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_forms\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"latin\" text,\n \"romanian\" text,\n \"portuguese\" text,\n \"spanish\" text,\n \"italian\" text,\n \"french\" text,\n \"greek_modern\" text,\n \"bulgarian\" text,\n \"macedonian\" text,\n \"polish_extinct\" text\n);\n\nQuestion: Name the macedonian for il/elle avait entendu" }, { "role": "assistant", "content": "SELECT \"macedonian\" FROM \"table_of_forms\" WHERE \"french\"='il/elle avait entendu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_forms\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"latin\" text,\n \"romanian\" text,\n \"portuguese\" text,\n \"spanish\" text,\n \"italian\" text,\n \"french\" text,\n \"greek_modern\" text,\n \"bulgarian\" text,\n \"macedonian\" text,\n \"polish_extinct\" text\n);\n\nQuestion: Name the greek modern for s\u0142ysza\u0142e\u015b by\u0142 / s\u0142ysza\u0142a\u015b by\u0142a" }, { "role": "assistant", "content": "SELECT \"greek_modern\" FROM \"table_of_forms\" WHERE \"polish_extinct\"='s\u0142ysza\u0142e\u015b by\u0142 / s\u0142ysza\u0142a\u015b by\u0142a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_forms\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"latin\" text,\n \"romanian\" text,\n \"portuguese\" text,\n \"spanish\" text,\n \"italian\" text,\n \"french\" text,\n \"greek_modern\" text,\n \"bulgarian\" text,\n \"macedonian\" text,\n \"polish_extinct\" text\n);\n\nQuestion: Name the bulgarian for jullie hadden gehoord" }, { "role": "assistant", "content": "SELECT \"bulgarian\" FROM \"table_of_forms\" WHERE \"dutch\"='jullie hadden gehoord';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_forms\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"latin\" text,\n \"romanian\" text,\n \"portuguese\" text,\n \"spanish\" text,\n \"italian\" text,\n \"french\" text,\n \"greek_modern\" text,\n \"bulgarian\" text,\n \"macedonian\" text,\n \"polish_extinct\" text\n);\n\nQuestion: Name the english for j'avais entendu" }, { "role": "assistant", "content": "SELECT \"english\" FROM \"table_of_forms\" WHERE \"french\"='j''avais entendu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_4\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: What was the air date in the U.S. for the episode that had 1.452 million Canadian viewers?" }, { "role": "assistant", "content": "SELECT \"u_s_air_date\" FROM \"table1_18424435_4\" WHERE \"canadian_viewers_million\"='1.452';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_4\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: What number episode in the series was directed by Kelly Makin and written by Mark Ellis & Stephanie Morgenstern?" }, { "role": "assistant", "content": "SELECT \"no\" FROM \"table1_18424435_4\" WHERE \"directed_by\"='Kelly Makin' AND \"written_by\"='Mark Ellis & Stephanie Morgenstern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_4\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: What is the maximum number of episodes in the series listed?" }, { "role": "assistant", "content": "SELECT MAX(\"no\") FROM \"table1_18424435_4\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_4\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: What is the total number of episodes listed with a production code of 306?" }, { "role": "assistant", "content": "SELECT COUNT(\"num\") FROM \"table1_18424435_4\" WHERE \"production_code\"=306;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_4\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: Who directed the episode with a production code of 301?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_18424435_4\" WHERE \"production_code\"=301;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: Who wrote the episodes watched by 1.816 million people in Canada?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_18424435_3\" WHERE \"canadian_viewers_million\"='1.816';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: Who wrote the episodes watched by 1.575 million people in Canada?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_18424435_3\" WHERE \"canadian_viewers_million\"='1.575';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: Who directed the episode aired on February 27, 2009?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_18424435_3\" WHERE \"u_s_air_date\"='February 27, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18424435_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"canadian_air_date\" text,\n \"u_s_air_date\" text,\n \"production_code\" real,\n \"canadian_viewers_million\" text\n);\n\nQuestion: Which episodes had production code 217?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_18424435_3\" WHERE \"production_code\"=217;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ohio_locations_ranked_by_per_capita_inco\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: For upper Arlington, what was the median household income?" }, { "role": "assistant", "content": "SELECT \"median_house_hold_income\" FROM \"ohio_locations_ranked_by_per_capita_inco\" WHERE \"place\"='Upper Arlington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ohio_locations_ranked_by_per_capita_inco\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: With a per capita income of $30,298, what was the total number of households?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_of_households\") FROM \"ohio_locations_ranked_by_per_capita_inco\" WHERE \"per_capita_income\"='$30,298';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ohio_locations_ranked_by_per_capita_inco\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: If the population is 2188, what was the median household income?" }, { "role": "assistant", "content": "SELECT \"median_house_hold_income\" FROM \"ohio_locations_ranked_by_per_capita_inco\" WHERE \"population\"=2188;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ohio_locations_ranked_by_per_capita_inco\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: For Pigeon Creek what is the per capita income?" }, { "role": "assistant", "content": "SELECT \"per_capita_income\" FROM \"ohio_locations_ranked_by_per_capita_inco\" WHERE \"place\"='Pigeon Creek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ohio_locations_ranked_by_per_capita_inco\" (\n \"rank\" real,\n \"place\" text,\n \"county\" text,\n \"per_capita_income\" text,\n \"median_house_hold_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: If the median income is $57,407, what is the per capita income?" }, { "role": "assistant", "content": "SELECT \"per_capita_income\" FROM \"ohio_locations_ranked_by_per_capita_inco\" WHERE \"median_house_hold_income\"='$57,407';" } ]