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 \"cultural_and_ethnic_composition\" (\n \"self_identification\" text,\n \"moldovan_census\" real,\n \"pct_core_moldova\" text,\n \"transnistrian_census\" real,\n \"pct_transnistria_bender\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: Name the % for total being 57613" }, { "role": "assistant", "content": "SELECT \"pct\" FROM \"cultural_and_ethnic_composition\" WHERE \"total\"=57613;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cultural_and_ethnic_composition\" (\n \"self_identification\" text,\n \"moldovan_census\" real,\n \"pct_core_moldova\" text,\n \"transnistrian_census\" real,\n \"pct_transnistria_bender\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: Name the total for % core moldova for 4.36%" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"cultural_and_ethnic_composition\" WHERE \"pct_core_moldova\"='4.36%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teletext_binary_nrz_encodings\" (\n \"standard\" text,\n \"color_system\" text,\n \"informational_cvbs_lines\" text,\n \"bit_rate_mbit_s\" text,\n \"waveform\" text,\n \"bits_per_line_including_run_in\" real,\n \"max_characters_per_page_row\" real\n);\n\nQuestion: What was the waveform of the encoding with a bit rate of 6.203?" }, { "role": "assistant", "content": "SELECT \"waveform\" FROM \"teletext_binary_nrz_encodings\" WHERE \"bit_rate_mbit_s\"='6.203';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teletext_binary_nrz_encodings\" (\n \"standard\" text,\n \"color_system\" text,\n \"informational_cvbs_lines\" text,\n \"bit_rate_mbit_s\" text,\n \"waveform\" text,\n \"bits_per_line_including_run_in\" real,\n \"max_characters_per_page_row\" real\n);\n\nQuestion: What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?" }, { "role": "assistant", "content": "SELECT \"informational_cvbs_lines\" FROM \"teletext_binary_nrz_encodings\" WHERE \"max_characters_per_page_row\"=32 AND \"standard\"='B (global)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teletext_binary_nrz_encodings\" (\n \"standard\" text,\n \"color_system\" text,\n \"informational_cvbs_lines\" text,\n \"bit_rate_mbit_s\" text,\n \"waveform\" text,\n \"bits_per_line_including_run_in\" real,\n \"max_characters_per_page_row\" real\n);\n\nQuestion: How many color systems has a bit rate of 5.734?" }, { "role": "assistant", "content": "SELECT COUNT(\"color_system\") FROM \"teletext_binary_nrz_encodings\" WHERE \"bit_rate_mbit_s\"='5.734';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teletext_binary_nrz_encodings\" (\n \"standard\" text,\n \"color_system\" text,\n \"informational_cvbs_lines\" text,\n \"bit_rate_mbit_s\" text,\n \"waveform\" text,\n \"bits_per_line_including_run_in\" real,\n \"max_characters_per_page_row\" real\n);\n\nQuestion: What was the max character (per page row) of the encoding with a bit rate of 6.203?" }, { "role": "assistant", "content": "SELECT MAX(\"max_characters_per_page_row\") FROM \"teletext_binary_nrz_encodings\" WHERE \"bit_rate_mbit_s\"='6.203';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations_are_made_for_the_top_of_eac\" (\n \"currency_bracket\" text,\n \"dollars_taxed_in_bracket\" text,\n \"rate\" text,\n \"taxes_from_bracket\" text,\n \"after_tax_income\" text,\n \"percentage_of_income_kept\" text\n);\n\nQuestion: Name the after tax income for percentage of income kept being 40.6%" }, { "role": "assistant", "content": "SELECT \"after_tax_income\" FROM \"calculations_are_made_for_the_top_of_eac\" WHERE \"percentage_of_income_kept\"='40.6%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations_are_made_for_the_top_of_eac\" (\n \"currency_bracket\" text,\n \"dollars_taxed_in_bracket\" text,\n \"rate\" text,\n \"taxes_from_bracket\" text,\n \"after_tax_income\" text,\n \"percentage_of_income_kept\" text\n);\n\nQuestion: Name the taxes from brqacket for percentage of income kept being 73%" }, { "role": "assistant", "content": "SELECT \"taxes_from_bracket\" FROM \"calculations_are_made_for_the_top_of_eac\" WHERE \"percentage_of_income_kept\"='73%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many teams won $2,089,556?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"winnings\"='$2,089,556';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: HOw many top 5 starts did the team with an average start of 17.7 have?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_5\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_start\"='17.7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" real,\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who is team 1 when team 2 is koper?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"team_2\"='Koper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" real,\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the tie when team 2 is koper?" }, { "role": "assistant", "content": "SELECT MIN(\"tie_no\") FROM \"second_round\" WHERE \"team_2\"='Koper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" real,\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: How many 1st leg have team 1 ofk belgrade?" }, { "role": "assistant", "content": "SELECT COUNT(\"1st_leg\") FROM \"second_round\" WHERE \"team_1\"='OFK Belgrade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" real,\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: How many tie no have team 1 as borac banja luka?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"second_round\" WHERE \"team_1\"='Borac Banja Luka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school\" text,\n \"year_founded\" text,\n \"denomination\" text,\n \"language\" text,\n \"grades\" text,\n \"gender\" text,\n \"private_public\" text\n);\n\nQuestion: What's the language in the school teaching grades 4-12?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"schools\" WHERE \"grades\"='4-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school\" text,\n \"year_founded\" text,\n \"denomination\" text,\n \"language\" text,\n \"grades\" text,\n \"gender\" text,\n \"private_public\" text\n);\n\nQuestion: What's the language of the school founded in 1949?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"schools\" WHERE \"year_founded\"='1949';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school\" text,\n \"year_founded\" text,\n \"denomination\" text,\n \"language\" text,\n \"grades\" text,\n \"gender\" text,\n \"private_public\" text\n);\n\nQuestion: What's the language of the school that teaches grades 4-12?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"schools\" WHERE \"grades\"='4-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school\" text,\n \"year_founded\" text,\n \"denomination\" text,\n \"language\" text,\n \"grades\" text,\n \"gender\" text,\n \"private_public\" text\n);\n\nQuestion: What's the gender of the students taught in the school founded in 1894?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"schools\" WHERE \"year_founded\"='1894';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school\" text,\n \"year_founded\" text,\n \"denomination\" text,\n \"language\" text,\n \"grades\" text,\n \"gender\" text,\n \"private_public\" text\n);\n\nQuestion: What's the language of classes in the school founded in 1874?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"schools\" WHERE \"year_founded\"='1874';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total\" real,\n \"champions\" real,\n \"current\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s\" text\n);\n\nQuestion: what is the least current" }, { "role": "assistant", "content": "SELECT MIN(\"current\") FROM \"by_nationality\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total\" real,\n \"champions\" real,\n \"current\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s\" text\n);\n\nQuestion: how many total where last/current driver(s) is narain karthikeyan ( 2010 )" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"by_nationality\" WHERE \"last_current_driver_s\"='Narain Karthikeyan ( 2010 )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"registered_live_births_by_nationality_an\" (\n \"year\" real,\n \"qatari_male\" real,\n \"qatari_female\" real,\n \"total_qatari\" real,\n \"non_qatari_male\" real,\n \"non_qatari_female\" real,\n \"total_non_qatar\" real,\n \"total_male\" real,\n \"total_female\" real,\n \"grand_total\" real\n);\n\nQuestion: How many numbers were recorded for Qatari female when Qatari male was 97?" }, { "role": "assistant", "content": "SELECT COUNT(\"qatari_female\") FROM \"registered_live_births_by_nationality_an\" WHERE \"qatari_male\"=97;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"registered_live_births_by_nationality_an\" (\n \"year\" real,\n \"qatari_male\" real,\n \"qatari_female\" real,\n \"total_qatari\" real,\n \"non_qatari_male\" real,\n \"non_qatari_female\" real,\n \"total_non_qatar\" real,\n \"total_male\" real,\n \"total_female\" real,\n \"grand_total\" real\n);\n\nQuestion: How many years were there 97 qatari male births?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"registered_live_births_by_nationality_an\" WHERE \"qatari_male\"=97;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"championship\" text,\n \"national_cup\" text,\n \"international_cup\" text\n);\n\nQuestion: What is the national cup statistics when the Championship is 21 app / 6 goals?" }, { "role": "assistant", "content": "SELECT \"national_cup\" FROM \"career_statistics\" WHERE \"championship\"='21 app / 6 goals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: How many runner-ups when Jason Crump placed 3rd?" }, { "role": "assistant", "content": "SELECT COUNT(\"runner_up\") FROM \"calendar\" WHERE \"3rd_placed\"='Jason Crump';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: Where did Grzegorz Walasek place 4th?" }, { "role": "assistant", "content": "SELECT \"city_and_venue\" FROM \"calendar\" WHERE \"4th_placed\"='Grzegorz Walasek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: Who came in 3rd place in Kr\u0161ko , Slovenia Matije Gubca Stadium" }, { "role": "assistant", "content": "SELECT \"3rd_placed\" FROM \"calendar\" WHERE \"city_and_venue\"='Kr\u0161ko , Slovenia Matije Gubca Stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: How many placed 4th on April 25?" }, { "role": "assistant", "content": "SELECT COUNT(\"4th_placed\") FROM \"calendar\" WHERE \"date\"='April 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_seven_ancient_wonders\" (\n \"name\" text,\n \"date_of_construction\" text,\n \"builder\" text,\n \"date_of_destruction\" text,\n \"cause_of_destruction\" text,\n \"modern_location\" text\n);\n\nQuestion: What caused the collapse of the Mausoleum at Halicarnassus?" }, { "role": "assistant", "content": "SELECT \"cause_of_destruction\" FROM \"the_seven_ancient_wonders\" WHERE \"name\"='Mausoleum at Halicarnassus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_seven_ancient_wonders\" (\n \"name\" text,\n \"date_of_construction\" text,\n \"builder\" text,\n \"date_of_destruction\" text,\n \"cause_of_destruction\" text,\n \"modern_location\" text\n);\n\nQuestion: How was the Temple of Artemis at Ephesus destroyed?" }, { "role": "assistant", "content": "SELECT \"cause_of_destruction\" FROM \"the_seven_ancient_wonders\" WHERE \"name\"='Temple of Artemis at Ephesus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Who came as a replacement in Sheffield United?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"team\"='Sheffield United';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: When was the new manager of the team on 21st position appointed?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"position_in_table\"='21st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was Gary Megson's manner of departure?" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='Gary Megson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: When did the old manager vacate his position in Plymouth Argyle?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"team\"='Plymouth Argyle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"location\" text,\n \"class_1\" text,\n \"best_uk_team\" text,\n \"class_1_200\" text,\n \"class_3\" text,\n \"class_1a\" text\n);\n\nQuestion: Name the best uk team for university of birmingham" }, { "role": "assistant", "content": "SELECT COUNT(\"best_uk_team\") FROM \"winners\" WHERE \"class_1_200\"='University of Birmingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"location\" text,\n \"class_1\" text,\n \"best_uk_team\" text,\n \"class_1_200\" text,\n \"class_3\" text,\n \"class_1a\" text\n);\n\nQuestion: Name the class 1-200 for university of hertfordshire for university of warwick" }, { "role": "assistant", "content": "SELECT \"class_1_200\" FROM \"winners\" WHERE \"best_uk_team\"='University of Hertfordshire' AND \"class_1a\"='University of Warwick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"location\" text,\n \"class_1\" text,\n \"best_uk_team\" text,\n \"class_1_200\" text,\n \"class_3\" text,\n \"class_1a\" text\n);\n\nQuestion: Name the total location for dynamic events winner" }, { "role": "assistant", "content": "SELECT COUNT(\"location\") FROM \"winners\" WHERE \"class_1_200\"='Dynamic Events Winner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"location\" text,\n \"class_1\" text,\n \"best_uk_team\" text,\n \"class_1_200\" text,\n \"class_3\" text,\n \"class_1a\" text\n);\n\nQuestion: Name the class 3 for silverstone rmit university" }, { "role": "assistant", "content": "SELECT \"class_3\" FROM \"winners\" WHERE \"location\"='Silverstone' AND \"class_1\"='RMIT University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: When 4th, great lakes is the regular season what is the league?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"regular_season\"='4th, Great Lakes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: When 5th is the regular season what is the highest season?" }, { "role": "assistant", "content": "SELECT MAX(\"division\") FROM \"year_by_year\" WHERE \"regular_season\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: When it's the 2nd round of the open cup what is the playoffs?" }, { "role": "assistant", "content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"open_cup\"='2nd Round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"u_s_open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: What league has an average attendance of 1452?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"avg_attendance\"=1452;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"u_s_open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: What year at the US Open Cup quarterfinals, were the playoffs in the semifinals for the USL second division?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"year_by_year\" WHERE \"league\"='USL Second Division' AND \"playoffs\"='Semifinals' AND \"u_s_open_cup\"='Quarterfinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19396259_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Name the original air date for production code of 3t7501" }, { "role": "assistant", "content": "SELECT COUNT(\"original_air_date\") FROM \"table1_19396259_1\" WHERE \"production_code\"='3T7501';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19396259_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Name the title directed by charles beeson by jeremy carver" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_19396259_1\" WHERE \"directed_by\"='Charles Beeson' AND \"written_by\"='Jeremy Carver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19396259_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Name the directed by for production code for 3t7509" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_19396259_1\" WHERE \"production_code\"='3T7509';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19401346_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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the season number of the episode originally aired on October 14, 2008?" }, { "role": "assistant", "content": "SELECT \"no_in_season\" FROM \"table1_19401346_1\" WHERE \"original_air_date\"='October 14, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19401346_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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the title of the episode originally aired on September 23, 2008?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_19401346_1\" WHERE \"original_air_date\"='September 23, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19401346_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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the series number of the episode seen by 9.35 million people in the US?" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_series\") FROM \"table1_19401346_1\" WHERE \"u_s_viewers_millions\"='9.35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19401346_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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the title of the episode with production code 10018?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_19401346_1\" WHERE \"production_code\"=10018;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19401346_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 \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of people in the US saw the episode with season number 1?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_19401346_1\" WHERE \"no_in_season\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank_2011\" real,\n \"change_since_2006\" text,\n \"urban_area\" text,\n \"county\" text,\n \"population_2011\" real,\n \"increase_since_2006\" text\n);\n\nQuestion: How many places has the rank changed since 2006, for Clane? " }, { "role": "assistant", "content": "SELECT \"change_since_2006\" FROM \"see_also\" WHERE \"urban_area\"='Clane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank_2011\" real,\n \"change_since_2006\" text,\n \"urban_area\" text,\n \"county\" text,\n \"population_2011\" real,\n \"increase_since_2006\" text\n);\n\nQuestion: In what counties is the 2011 population 17908?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"see_also\" WHERE \"population_2011\"=17908;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank_2011\" real,\n \"change_since_2006\" text,\n \"urban_area\" text,\n \"county\" text,\n \"population_2011\" real,\n \"increase_since_2006\" text\n);\n\nQuestion: In what urban area is the 2011 population 21561? " }, { "role": "assistant", "content": "SELECT \"urban_area\" FROM \"see_also\" WHERE \"population_2011\"=21561;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank_2011\" real,\n \"change_since_2006\" text,\n \"urban_area\" text,\n \"county\" text,\n \"population_2011\" real,\n \"increase_since_2006\" text\n);\n\nQuestion: How many places did the rank change since 22006 for County Leitrim? " }, { "role": "assistant", "content": "SELECT COUNT(\"change_since_2006\") FROM \"see_also\" WHERE \"county\"='County Leitrim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank_2011\" real,\n \"change_since_2006\" text,\n \"urban_area\" text,\n \"county\" text,\n \"population_2011\" real,\n \"increase_since_2006\" text\n);\n\nQuestion: Which urban area has a 2011 population of 5010? " }, { "role": "assistant", "content": "SELECT \"urban_area\" FROM \"see_also\" WHERE \"population_2011\"=5010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19398910_4\" (\n \"athlete\" text,\n \"class\" text,\n \"event\" text,\n \"bout_1\" text,\n \"bout_2\" text,\n \"bout_3\" text,\n \"bout_4\" text,\n \"bout_5\" text,\n \"bout_6\" text,\n \"rank\" text,\n \"1_8_finals\" text,\n \"quarterfinals\" text,\n \"semifinals\" text\n);\n\nQuestion: what were the result in semifinals when saengsawang ( tha ) l 9-15 was in 1/8 finals?" }, { "role": "assistant", "content": "SELECT \"semifinals\" FROM \"table1_19398910_4\" WHERE \"1_8_finals\"='Saengsawang ( THA ) L 9-15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19398910_4\" (\n \"athlete\" text,\n \"class\" text,\n \"event\" text,\n \"bout_1\" text,\n \"bout_2\" text,\n \"bout_3\" text,\n \"bout_4\" text,\n \"bout_5\" text,\n \"bout_6\" text,\n \"rank\" text,\n \"1_8_finals\" text,\n \"quarterfinals\" text,\n \"semifinals\" text\n);\n\nQuestion: wich were the events when bout 2 was zhang ( chn ) l 0-5?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"table1_19398910_4\" WHERE \"bout_2\"='Zhang ( CHN ) L 0-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19398910_4\" (\n \"athlete\" text,\n \"class\" text,\n \"event\" text,\n \"bout_1\" text,\n \"bout_2\" text,\n \"bout_3\" text,\n \"bout_4\" text,\n \"bout_5\" text,\n \"bout_6\" text,\n \"rank\" text,\n \"1_8_finals\" text,\n \"quarterfinals\" text,\n \"semifinals\" text\n);\n\nQuestion: Which were the bout 1 when the bout 5 was andreev ( rus ) w 5-2?" }, { "role": "assistant", "content": "SELECT \"bout_1\" FROM \"table1_19398910_4\" WHERE \"bout_5\"='Andreev ( RUS ) W 5-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19398910_4\" (\n \"athlete\" text,\n \"class\" text,\n \"event\" text,\n \"bout_1\" text,\n \"bout_2\" text,\n \"bout_3\" text,\n \"bout_4\" text,\n \"bout_5\" text,\n \"bout_6\" text,\n \"rank\" text,\n \"1_8_finals\" text,\n \"quarterfinals\" text,\n \"semifinals\" text\n);\n\nQuestion: when Sanchez ( esp ) w 5-0 were the bout 6, which were the class?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"table1_19398910_4\" WHERE \"bout_6\"='Sanchez ( ESP ) W 5-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: How many attempts for Bobby Layne?" }, { "role": "assistant", "content": "SELECT MIN(\"attempts\") FROM \"team_career_passing_records\" WHERE \"name\"='Bobby Layne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: What is the highest number of interceptions?" }, { "role": "assistant", "content": "SELECT MAX(\"interceptions\") FROM \"team_career_passing_records\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: How many total yards for Bobby Layne?" }, { "role": "assistant", "content": "SELECT MAX(\"yards\") FROM \"team_career_passing_records\" WHERE \"name\"='Bobby Layne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: Which QB had a rating of 72.3?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"team_career_passing_records\" WHERE \"qb_rating\"='72.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: How many QB ratings for the player with 1069 completions?" }, { "role": "assistant", "content": "SELECT COUNT(\"qb_rating\") FROM \"team_career_passing_records\" WHERE \"completions\"=1069;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_career_passing_records\" (\n \"name\" text,\n \"completions\" real,\n \"attempts\" real,\n \"completion_pct\" text,\n \"yards\" real,\n \"touchdowns\" real,\n \"interceptions\" real,\n \"qb_rating\" text\n);\n\nQuestion: How many yardage figures for the player with 72.3 QB rating?" }, { "role": "assistant", "content": "SELECT COUNT(\"yards\") FROM \"team_career_passing_records\" WHERE \"qb_rating\"='72.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1941183_2\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: In how many locations was the game against Barcelona Dragons played?" }, { "role": "assistant", "content": "SELECT COUNT(\"game_site\") FROM \"table1_1941183_2\" WHERE \"opponent\"='Barcelona Dragons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_1\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" real,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: how many posiitions did saudi arabia land on" }, { "role": "assistant", "content": "SELECT COUNT(\"pos\") FROM \"table1_19412902_1\" WHERE \"member_association\"='Saudi Arabia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_1\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" real,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: what is the play-off in group stage 4 and clubs is 12" }, { "role": "assistant", "content": "SELECT \"play_off\" FROM \"table1_19412902_1\" WHERE \"group_stage\"=4 AND \"clubs\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_1\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" real,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: which group stage was there 0 play-offs and 12 clubs played in it" }, { "role": "assistant", "content": "SELECT COUNT(\"group_stage\") FROM \"table1_19412902_1\" WHERE \"play_off\"=0 AND \"clubs\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_1\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" real,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: which club in group stage 4 had member association iran" }, { "role": "assistant", "content": "SELECT \"clubs\" FROM \"table1_19412902_1\" WHERE \"group_stage\"=4 AND \"member_association\"='Iran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19417244_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: who write the episode that have 14.39 million viewers" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_19417244_2\" WHERE \"u_s_viewers_millions\"='14.39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19417244_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: how many people directed the episode that is called \"dead inside\"" }, { "role": "assistant", "content": "SELECT COUNT(\"directed_by\") FROM \"table1_19417244_2\" WHERE \"title\"='\\\"Dead Inside\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19417244_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: who directed the episode that have 14.59 million viewers" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_19417244_2\" WHERE \"u_s_viewers_millions\"='14.59';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19417244_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: who write the episode 5 in no. in season" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_19417244_2\" 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_19412902_2\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" text,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: How many clubs are there in the Korea Republic?" }, { "role": "assistant", "content": "SELECT \"clubs\" FROM \"table1_19412902_2\" WHERE \"member_association\"='Korea Republic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_2\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" text,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: At what position is the association with 279 points?" }, { "role": "assistant", "content": "SELECT MIN(\"pos\") FROM \"table1_19412902_2\" WHERE \"points_total_500\"=279;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19412902_2\" (\n \"pos\" real,\n \"member_association\" text,\n \"points_total_500\" real,\n \"clubs\" text,\n \"group_stage\" real,\n \"play_off\" real,\n \"afc_cup\" real\n);\n\nQuestion: What is the lowest position?" }, { "role": "assistant", "content": "SELECT MAX(\"pos\") FROM \"table1_19412902_2\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whanau_house_system\" (\n \"house_name\" text,\n \"house_mascot\" text,\n \"house_colour\" text,\n \"year_opened\" real,\n \"house_leader\" text\n);\n\nQuestion: What is the earliest year a house opened?" }, { "role": "assistant", "content": "SELECT MIN(\"year_opened\") FROM \"whanau_house_system\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whanau_house_system\" (\n \"house_name\" text,\n \"house_mascot\" text,\n \"house_colour\" text,\n \"year_opened\" real,\n \"house_leader\" text\n);\n\nQuestion: How many house colours are associated with house names of Hillary?" }, { "role": "assistant", "content": "SELECT COUNT(\"house_colour\") FROM \"whanau_house_system\" WHERE \"house_name\"='Hillary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whanau_house_system\" (\n \"house_name\" text,\n \"house_mascot\" text,\n \"house_colour\" text,\n \"year_opened\" real,\n \"house_leader\" text\n);\n\nQuestion: What is the house colour associated with the house name of Kupe?" }, { "role": "assistant", "content": "SELECT \"house_colour\" FROM \"whanau_house_system\" WHERE \"house_name\"='Kupe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whanau_house_system\" (\n \"house_name\" text,\n \"house_mascot\" text,\n \"house_colour\" text,\n \"year_opened\" real,\n \"house_leader\" text\n);\n\nQuestion: How many house mascots are associated with yellow house colours?" }, { "role": "assistant", "content": "SELECT COUNT(\"house_mascot\") FROM \"whanau_house_system\" WHERE \"house_colour\"='Yellow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19485888_1\" (\n \"o_o_corresponds_to_the_official_order_as_listed_by_institut_national_de_l_audiovisuel_ina_and_animez_vous_com\" text,\n \"b_b_corresponds_to_tf1s_broadcast_schedule\" text,\n \"title_french_english\" text,\n \"original_beechwood_bunny_tale_source_material\" text,\n \"air_date_france\" text\n);\n\nQuestion: what is the title of the episode where b b is 20/16" }, { "role": "assistant", "content": "SELECT \"title_french_english\" FROM \"table1_19485888_1\" WHERE \"b_b_corresponds_to_tf1s_broadcast_schedule\"='20/16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" text,\n \"playoff_berths\" real,\n \"division_titles\" real,\n \"postseason_record\" text,\n \"super_bowl_record\" text\n);\n\nQuestion: What is the minimum losses for the Kansas City Chiefs?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"notes\" WHERE \"team\"='Kansas City Chiefs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" text,\n \"playoff_berths\" real,\n \"division_titles\" real,\n \"postseason_record\" text,\n \"super_bowl_record\" text\n);\n\nQuestion: How many division titles are there when the win pc is .558?" }, { "role": "assistant", "content": "SELECT \"division_titles\" FROM \"notes\" WHERE \"win_pct\"='.558';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions_regions_and_sta\" (\n \"no\" real,\n \"state_region\" text,\n \"districts\" real,\n \"town_ships\" real,\n \"cities_towns\" real,\n \"wards\" real,\n \"village_groups\" real,\n \"villages\" real\n);\n\nQuestion: How many villages are there in the Magway region?" }, { "role": "assistant", "content": "SELECT \"villages\" FROM \"administrative_divisions_regions_and_sta\" WHERE \"state_region\"='Magway Region';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions_regions_and_sta\" (\n \"no\" real,\n \"state_region\" text,\n \"districts\" real,\n \"town_ships\" real,\n \"cities_towns\" real,\n \"wards\" real,\n \"village_groups\" real,\n \"villages\" real\n);\n\nQuestion: How many townships are there in region number 2?" }, { "role": "assistant", "content": "SELECT MAX(\"town_ships\") FROM \"administrative_divisions_regions_and_sta\" WHERE \"no\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_divisions_regions_and_sta\" (\n \"no\" real,\n \"state_region\" text,\n \"districts\" real,\n \"town_ships\" real,\n \"cities_towns\" real,\n \"wards\" real,\n \"village_groups\" real,\n \"villages\" real\n);\n\nQuestion: How many townships are there in the region with 376 village groups?" }, { "role": "assistant", "content": "SELECT MAX(\"town_ships\") FROM \"administrative_divisions_regions_and_sta\" WHERE \"village_groups\"=376;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" real\n);\n\nQuestion: How many poles for the Netherlands?" }, { "role": "assistant", "content": "SELECT MAX(\"poles\") FROM \"by_name\" WHERE \"country\"='Netherlands';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" real\n);\n\nQuestion: How many seasons for Monaco?" }, { "role": "assistant", "content": "SELECT \"seasons\" FROM \"by_name\" WHERE \"country\"='Monaco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" real\n);\n\nQuestion: Who is the competitor from France with 10 starts?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"by_name\" WHERE \"country\"='France' AND \"race_entries_starts\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1949746_1\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"licensee\" text,\n \"format\" text\n);\n\nQuestion: When 1180 am is the frequency how many call signs are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"call_sign\") FROM \"table1_1949746_1\" WHERE \"frequency\"='1180 AM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1949746_1\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"licensee\" text,\n \"format\" text\n);\n\nQuestion: When portsmouth is the city of license who is the licensee?" }, { "role": "assistant", "content": "SELECT \"licensee\" FROM \"table1_1949746_1\" WHERE \"city_of_license\"='Portsmouth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1949746_1\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"licensee\" text,\n \"format\" text\n);\n\nQuestion: When 790 am is the frequency what is the format?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"table1_1949746_1\" WHERE \"frequency\"='790 AM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1949746_1\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"licensee\" text,\n \"format\" text\n);\n\nQuestion: When 90.7 fm is the frequency who is the licensee?" }, { "role": "assistant", "content": "SELECT \"licensee\" FROM \"table1_1949746_1\" WHERE \"frequency\"='90.7 FM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total_drivers\" real,\n \"champions\" real,\n \"championships\" real,\n \"current_march_20_2010\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s_march_20_2010\" text\n);\n\nQuestion: How many drivers does India have/" }, { "role": "assistant", "content": "SELECT COUNT(\"total_drivers\") FROM \"by_nationality\" WHERE \"country\"='India';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total_drivers\" real,\n \"champions\" real,\n \"championships\" real,\n \"current_march_20_2010\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s_march_20_2010\" text\n);\n\nQuestion: How many championships does Pakistan have?" }, { "role": "assistant", "content": "SELECT COUNT(\"championships\") FROM \"by_nationality\" WHERE \"country\"='Pakistan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total_drivers\" real,\n \"champions\" real,\n \"championships\" real,\n \"current_march_20_2010\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s_march_20_2010\" text\n);\n\nQuestion: How many countries have 2 current drivers as of March 20, 2010?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_drivers\") FROM \"by_nationality\" WHERE \"current_march_20_2010\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total_drivers\" real,\n \"champions\" real,\n \"championships\" real,\n \"current_march_20_2010\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s_march_20_2010\" text\n);\n\nQuestion: How many current drivers, as of March 20, 2010 does Denmark have?" }, { "role": "assistant", "content": "SELECT \"current_march_20_2010\" FROM \"by_nationality\" WHERE \"country\"='Denmark';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_nationality\" (\n \"country\" text,\n \"total_drivers\" real,\n \"champions\" real,\n \"championships\" real,\n \"current_march_20_2010\" real,\n \"first_driver_s\" text,\n \"last_current_driver_s_march_20_2010\" text\n);\n\nQuestion: What in the minimum number of championships won by a nation?" }, { "role": "assistant", "content": "SELECT MIN(\"championships\") FROM \"by_nationality\";" } ]