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