text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); Question: When edward shaw is the winner what is the date? <|assistant|> SELECT "date" FROM "changes_during_term" WHERE "winner"='Edward Shaw';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); Question: When peninsula is the electorate what is the reason? <|assistant|> SELECT "reason" FROM "changes_during_term" WHERE "electorate"='Peninsula';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); Question: When james seaton is the incumbent what is the reason? <|assistant|> SELECT "reason" FROM "changes_during_term" WHERE "incumbent"='James Seaton';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); Question: What was the handicap when the prize money was 120s? <|assistant|> SELECT "handicap" FROM "race_record" WHERE "prize_money"='120s';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); Question: On what date was the handicap 8 st 12 lb? <|assistant|> SELECT "date" FROM "race_record" WHERE "handicap"='8 st 12 lb';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); Question: On what date was the track Ballarat? <|assistant|> SELECT "date" FROM "race_record" WHERE "track"='Ballarat';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); Question: How many literate females(%) are there where the male(%) is 51.66 <|assistant|> SELECT "literate_female_pct" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "male_pct"='51.66';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); Question: How many literate males are there in the taluka name nevasa? <|assistant|> SELECT MAX("literate_male") FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "taluka_name"='Nevasa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); Question: How many literate male (%) are there in the district that has a population of 3.28? <|assistant|> SELECT COUNT("literate_male_pct") FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "pct_of_district_population"='3.28';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); Question: how many literate males are there that has a district population of 6.65? <|assistant|> SELECT "literate_male" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "pct_of_district_population"='6.65';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); Question: How many males are in the group that has an amount of 139361 <|assistant|> SELECT "male" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "female"=139361;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: List all the runners-up on 16 October 2012? <|assistant|> SELECT "runners_up" FROM "series_overview" WHERE "finale"='16 October 2012';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: What is the date when Miranda Gore Browne was runner-up? <|assistant|> SELECT "finale" FROM "series_overview" WHERE "runners_up"='Miranda Gore Browne';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: What is the date of the finale where Holly Bell was runner-up? <|assistant|> SELECT "finale" FROM "series_overview" WHERE "runners_up"='Holly Bell';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: What is the premiere of the season where Holly Bell was the runner-up? <|assistant|> SELECT "premiere" FROM "series_overview" WHERE "runners_up"='Holly Bell';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: How many runners-up were there when Joanne Wheatley won? <|assistant|> SELECT COUNT("runners_up") FROM "series_overview" WHERE "winner"='Joanne Wheatley';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); Question: Who won the season for which Brendan Lynch is the runner-up? <|assistant|> SELECT "winner" FROM "series_overview" WHERE "runners_up"='Brendan Lynch';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What is the pick # when the new jersey devils is the nhl team? <|assistant|> SELECT "pick_num" FROM "round_three" WHERE "nhl_team"='New Jersey Devils';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which college/junior/team has defence as the position with canada as the nationality and the pick # is less than 61.0? <|assistant|> SELECT "college_junior_club_team" FROM "round_three" WHERE "position"='Defence' AND "nationality"='Canada' AND "pick_num"<61.0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which nhl team has kris draper as the player? <|assistant|> SELECT "nhl_team" FROM "round_three" WHERE "player"='Kris Draper';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which position has new Jersey Devils as the nhl team? <|assistant|> SELECT "position" FROM "round_three" WHERE "nhl_team"='New Jersey Devils';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which college/junior/club team has jim mathieson as the player? <|assistant|> SELECT "college_junior_club_team" FROM "round_three" WHERE "player"='Jim Mathieson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); Question: What is the series number of "the fallen star"? <|assistant|> SELECT "series_num" FROM "table1_28967275_2" WHERE "episode_title"='\"The Fallen Star\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); Question: What is the production code of the episode with series #8? <|assistant|> SELECT "production_code" FROM "table1_28967275_2" WHERE "series_num"=8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); Question: How many episodes are titled "the suspension"? <|assistant|> SELECT COUNT("episode_num") FROM "table1_28967275_2" WHERE "episode_title"='\"The Suspension\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); Question: What is the title of the episode with series number 14? <|assistant|> SELECT "episode_title" FROM "table1_28967275_2" WHERE "series_num"=14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); Question: What is the original airdate of episode #31? <|assistant|> SELECT "original_air_date" FROM "table1_28967275_2" WHERE "episode_num"=31;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Who was drafted to the Vancouver Canucks? <|assistant|> SELECT "player" FROM "round_eight" WHERE "nhl_team"='Vancouver Canucks';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: How many figures are provided for the team when the position drafted is center? <|assistant|> SELECT COUNT("nhl_team") FROM "round_eight" WHERE "position"='Center';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What was the pick number when Paul Krake was selected? <|assistant|> SELECT MIN("pick_num") FROM "round_eight" WHERE "player"='Paul Krake';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What pick number did the New York Rangers have? <|assistant|> SELECT "pick_num" FROM "round_eight" WHERE "nhl_team"='New York Rangers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What pick number was the Boston Bruins selection for defence? <|assistant|> SELECT "pick_num" FROM "round_eight" WHERE "position"='Defence' AND "nhl_team"='Boston Bruins';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which player is pick 64? <|assistant|> SELECT "player" FROM "round_four" WHERE "pick_num"=64;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which player is the centre for the Detroit Red Wings? <|assistant|> SELECT "player" FROM "round_four" WHERE "position"='Centre' AND "nhl_team"='Detroit Red Wings';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: How many positions drafted for the Minnesota North Stars? <|assistant|> SELECT COUNT("position") FROM "round_four" WHERE "nhl_team"='Minnesota North Stars';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What position did Roseau High School (USHS-MN) play? <|assistant|> SELECT "position" FROM "round_seven" WHERE "college_junior_club_team"='Roseau High School (USHS-MN)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: What are Scott Zygulski's pick numbers? <|assistant|> SELECT "pick_num" FROM "round_seven" WHERE "player"='Scott Zygulski';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which country is pick# 136 from? <|assistant|> SELECT "nationality" FROM "round_seven" WHERE "pick_num"=136;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: How many nationalities does Alex Nikolic come from? <|assistant|> SELECT COUNT("nationality") FROM "round_seven" WHERE "player"='Alex Nikolic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: How many NHL teams have a pick number of 128? <|assistant|> SELECT COUNT("nhl_team") FROM "round_seven" WHERE "pick_num"=128;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_7_3_4" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Name the opponents for anabel medina garrigues <|assistant|> SELECT COUNT("opponents") FROM "doubles_7_3_4" WHERE "partner"='Anabel Medina Garrigues';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_7_3_4" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Name the parter for w/o <|assistant|> SELECT "partner" FROM "doubles_7_3_4" WHERE "score"='w/o';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); Question: Which of the networks originate in Xalapa? <|assistant|> SELECT "network" FROM "regional_broadcast_television_networks" WHERE "origin"='Xalapa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); Question: What are all the programs on the Soy Guerrero network? <|assistant|> SELECT "programming" FROM "regional_broadcast_television_networks" WHERE "network"='Soy Guerrero';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); Question: Which owners originate in Mexico City? <|assistant|> SELECT "owner" FROM "regional_broadcast_television_networks" WHERE "origin"='Mexico City';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); Question: Which network serves the Guerrero region <|assistant|> SELECT "network" FROM "regional_broadcast_television_networks" WHERE "region"='Guerrero';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); Question: Which regions are owned by estado de tabasco? <|assistant|> SELECT "region" FROM "regional_broadcast_television_networks" WHERE "owner"='Estado de Tabasco';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); Question: What subdivision names (RU) have a code of by-hr? <|assistant|> SELECT "subdivision_name_ru_bgn_pcgn" FROM "current_codes" WHERE "code"='BY-HR';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); Question: What cods have a subdivision name (RU) of Grodnenskaya Oblast'? <|assistant|> SELECT "code" FROM "current_codes" WHERE "subdivision_name_ru_bgn_pcgn"='Grodnenskaya oblast''';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); Question: What are the subdivision names (RU) where the subdivision name (BE) is Hrodzenskaya Voblasts'? <|assistant|> SELECT "subdivision_name_ru_gost" FROM "current_codes" WHERE "subdivision_name_be_bgn_pcgn"='Hrodzenskaya voblasts''';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); Question: What is the subdivision name (BE) where subdivision name (RU) (BGN) is Grodnenskaya Oblast'? <|assistant|> SELECT "subdivision_name_be_bgn_pcgn" FROM "current_codes" WHERE "subdivision_name_ru_bgn_pcgn"='Grodnenskaya oblast''';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); Question: Which codes have subdivision names (BE) (BGN) of Homyel'skaya Voblasts'? <|assistant|> SELECT "code" FROM "current_codes" WHERE "subdivision_name_be_bgn_pcgn"='Homyel''skaya voblasts''';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the into service for dh1 <|assistant|> SELECT "into_service" FROM "history" WHERE "number"='DH1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the withdrawn for example and serial number 579 <|assistant|> SELECT "withdrawn" FROM "history" WHERE "into_service"='Example' AND "serial_number"=579;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the into service for dh2 <|assistant|> SELECT "into_service" FROM "history" WHERE "number"='DH2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the most serial number for feb 1994 <|assistant|> SELECT MAX("serial_number") FROM "history" WHERE "scrapped"='Feb 1994';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the number for 2004 scapped <|assistant|> SELECT "number" FROM "history" WHERE "scrapped"='2004';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); Question: Name the into service for dh1 <|assistant|> SELECT "into_service" FROM "history" WHERE "number"='DH1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); Question: How many month names are there for the tenth numbered month? <|assistant|> SELECT COUNT("month_name") FROM "the_year" WHERE "numbered_month"='Tenth';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); Question: What is the defective year for the eighth numbered month? <|assistant|> SELECT "defective_year" FROM "the_year" WHERE "numbered_month"='Eighth';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); Question: What is the month sequence for the month name of av? <|assistant|> SELECT MIN("month_sequence") FROM "the_year" WHERE "month_name"='Av';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); Question: What is the defective year for the regular year of 29 days and month sequence of 2? <|assistant|> SELECT MAX("defective_year") FROM "the_year" WHERE "regular_year"='29 days' AND "month_sequence"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When 4.5 is the rating (18-49) what is the air date? <|assistant|> SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "rating_18_49"='4.5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When 13 is the share (18-49) what is the rank (timeslot)? <|assistant|> SELECT "rank_timeslot" FROM "u_s_nielsen_ratings" WHERE "share_18_49"=13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When 11 is the episode what is the air date? <|assistant|> SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "episode"=11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When there are 10.02 million viewers what is the rating (18-49)? <|assistant|> SELECT "rating_18_49" FROM "u_s_nielsen_ratings" WHERE "viewers_millions"='10.02';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When there are 9.28 million viewers what is the share (18-49)? <|assistant|> SELECT "share_18_49" FROM "u_s_nielsen_ratings" WHERE "viewers_millions"='9.28';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); Question: When 4 is the episode what is the air date? <|assistant|> SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "episode"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_21_10_titles_11_runners_up" ( "result" text, "no" real, "date" text, "category" text, "tournament" text, "surface" text, "opponent" text, "score" text ); Question: How many different results were there for the scores 6–7 (2–7) , 6–2, 7–6 (7–3)? <|assistant|> SELECT COUNT("result") FROM "singles_21_10_titles_11_runners_up" WHERE "score"='6–7 (2–7) , 6–2, 7–6 (7–3)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); Question: Who was the writer for episode 3? <|assistant|> SELECT "writer" FROM "episode_information" WHERE "episode"=3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); Question: What was the original airdate for the episode written by daisuke habara and directed by akimitsu sasaki <|assistant|> SELECT "original_airdate" FROM "episode_information" WHERE "writer"='Daisuke Habara' AND "director"='Akimitsu Sasaki';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); Question: What episode did tomoyuki furumaya <|assistant|> SELECT "title" FROM "episode_information" WHERE "director"='Tomoyuki Furumaya';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); Question: What is the earliest round where collingswood lost by 36 points? <|assistant|> SELECT MIN("round") FROM "regular_home_and_away_season" WHERE "result_includes_margin"='Lost by 36 points';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); Question: What was the score on saturday, 26 june 7:10pm? <|assistant|> SELECT "score_collingwoods_score_is_in_bold" FROM "regular_home_and_away_season" WHERE "date"='Saturday, 26 June 7:10pm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); Question: What is the round number of the round against melbourne on saturday, 4 april 2:10pm? <|assistant|> SELECT MIN("round") FROM "regular_home_and_away_season" WHERE "opponent"='Melbourne' AND "date"='Saturday, 4 April 2:10pm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); Question: Which venue did collingsworth play essendon in when they had the 3rd position on the ladder? <|assistant|> SELECT "venue" FROM "regular_home_and_away_season" WHERE "opponent"='Essendon' AND "position_on_ladder"='3rd';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); Question: Was the round where they were in 6th at home or away? <|assistant|> SELECT "home_away" FROM "regular_home_and_away_season" WHERE "position_on_ladder"='6th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); Question: What was the previous school for the forward with a height of ft5in (m)? <|assistant|> SELECT "previous_school" FROM "roster" WHERE "height"='ft5in (m)' AND "position"='Forward';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); Question: What is the lowest listed number for a player? <|assistant|> SELECT MIN("num") FROM "roster";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); Question: Who previously attended south kent school / brentwood hs? <|assistant|> SELECT "name" FROM "roster" WHERE "previous_school"='South Kent School / Brentwood HS';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); Question: What is the highest number a guard from brophy college prep wore? <|assistant|> SELECT MAX("num") FROM "roster" WHERE "position"='Guard' AND "previous_school"='Brophy College Prep';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: How many directed by entries have UK viewership over 6.16 million? <|assistant|> SELECT COUNT("directed_by") FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: Who directed the episode with a UK viewership of exactly 5.77 million? <|assistant|> SELECT "directed_by" FROM "table1_29063233_1" WHERE "uk_viewers_million"='5.77';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: What was the airdate of the episode with a UK viewership of 6.02 million? <|assistant|> SELECT "original_air_date" FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.02';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: Who directed the episode with UK viewership of 6.09 million? <|assistant|> SELECT "directed_by" FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.09';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leadership_classification" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); Question: Name the general classification for mauricio soler <|assistant|> SELECT "general_classification" FROM "leadership_classification" WHERE "winner"='Mauricio Soler';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leadership_classification" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); Question: Name the general classification for steven kruijswijk <|assistant|> SELECT "general_classification" FROM "leadership_classification" WHERE "winner"='Steven Kruijswijk';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leadership_classification" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); Question: Name the points classification for levi leipheimer <|assistant|> SELECT "points_classification" FROM "leadership_classification" WHERE "general_classification"='Levi Leipheimer';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leadership_classification" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); Question: Name the mountains classification for rabobank and damiano cunego <|assistant|> SELECT "mountains_classification" FROM "leadership_classification" WHERE "team_classification"='Rabobank' AND "general_classification"='Damiano Cunego';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leadership_classification" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); Question: Name the team classification for thomas de gendt <|assistant|> SELECT "team_classification" FROM "leadership_classification" WHERE "winner"='Thomas De Gendt';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "class_34_500_ge_type_u26_c" ( "ge_dl_works_no" real, "year_built" text, "built_for" text, "original_no" text, "new_owner" text, "new_no" text ); Question: What is listed in built for when the original number is 24d? <|assistant|> SELECT "built_for" FROM "class_34_500_ge_type_u26_c" WHERE "original_no"='24D';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29102612_1" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real, "u_s_viewers_millions" text ); Question: What is the original air date when the title is "be prepared"? <|assistant|> SELECT "original_air_date" FROM "table1_29102612_1" WHERE "title"='\"Be Prepared\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29102612_1" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real, "u_s_viewers_millions" text ); Question: What is the season # when ther are 5.3 million U.S viewers? <|assistant|> SELECT MAX("season_num") FROM "table1_29102612_1" WHERE "u_s_viewers_millions"='5.3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: What dat did "The changeling" originally air? <|assistant|> SELECT "original_air_date" FROM "table1_29106680_1" WHERE "title"='\"The Changeling\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: What date did "the eye of the phoenix" originally air? <|assistant|> SELECT "original_air_date" FROM "table1_29106680_1" WHERE "title"='\"The Eye of the Phoenix\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); Question: What episode number of the series is "the coming of arthur (part 1)"? <|assistant|> SELECT "no_for_series" FROM "table1_29106680_1" WHERE "title"='\"The Coming of Arthur (Part 1)\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); Question: What are the titles of episodes written by Eric Trueheart? <|assistant|> SELECT "title" FROM "table1_29087004_3" WHERE "written_by"='Eric Trueheart';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); Question: What is the highest numbered episode where the title is "The Ruff Ruff Bunch"? <|assistant|> SELECT MAX("series_num") FROM "table1_29087004_3" WHERE "title"='\"The Ruff Ruff Bunch\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); Question: Who were the writers of episode/s first aired in the US on June 9, 2012? <|assistant|> SELECT "written_by" FROM "table1_29087004_3" WHERE "united_states_original_airdate"='June 9, 2012';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); Question: When was the episode titled "The Fraud Princess" first aired in the United States? <|assistant|> SELECT "united_states_original_airdate" FROM "table1_29087004_3" WHERE "title"='\"The Fraud Princess\"';<|endoftext|>