text
stringlengths
369
840
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_2221374_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); Write an SQL query that provides the solution to the following question: "Who directed "Freaky Friday"?". [/INST] SELECT "directed_by" FROM "table1_2221374_3" WHERE "title"='\"Freaky Friday\"'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_2221374_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); Write an SQL query that provides the solution to the following question: "What date was the episode originally aired that was directed by James Widdoes and the production code is 320?". [/INST] SELECT "original_air_date" FROM "table1_2221374_3" WHERE "directed_by"='James Widdoes' AND "production_code"=320; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_2221374_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); Write an SQL query that provides the solution to the following question: "How many production codes are there for "the sub"?". [/INST] SELECT COUNT("production_code") FROM "table1_2221374_3" WHERE "title"='\"The Sub\"'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_2221374_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); Write an SQL query that provides the solution to the following question: "What is the production code for episode 3 of the season?". [/INST] SELECT "production_code" FROM "table1_2221374_3" WHERE "no_in_season"=3; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "selected_recordings" ( "piano" text, "conductor" text, "orchestra" text, "record_company" text, "year_of_recording" real, "format" text ); Write an SQL query that provides the solution to the following question: "Which orchestra has a recording year of 1951?". [/INST] SELECT "orchestra" FROM "selected_recordings" WHERE "year_of_recording"=1951; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "selected_recordings" ( "piano" text, "conductor" text, "orchestra" text, "record_company" text, "year_of_recording" real, "format" text ); Write an SQL query that provides the solution to the following question: "Where is the orchestra when the year of recording is 1934?". [/INST] SELECT "orchestra" FROM "selected_recordings" WHERE "year_of_recording"=1934; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_222666_1" ( "former_country_name" text, "former_codes" text, "period_of_validity" text, "iso_3166_3_code" text, "new_country_names_and_codes" text ); Write an SQL query that provides the solution to the following question: "Name the former codes for merged into panama ( pa , pan , 591 )". [/INST] SELECT "former_codes" FROM "table1_222666_1" WHERE "new_country_names_and_codes"='Merged into Panama ( PA , PAN , 591 )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_222666_1" ( "former_country_name" text, "former_codes" text, "period_of_validity" text, "iso_3166_3_code" text, "new_country_names_and_codes" text ); Write an SQL query that provides the solution to the following question: "Name the total number for period of validity for upper volta". [/INST] SELECT COUNT("period_of_validity") FROM "table1_222666_1" WHERE "former_country_name"='Upper Volta'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "elected_body" ( "election" text, "mayor" text, "seat_no_1" text, "seat_no_2" text, "seat_no_3" text, "seat_no_4" text, "seat_no_5" text, "seat_no_6" text ); Write an SQL query that provides the solution to the following question: "Who was the winner of seat no 4 for the election on January 25, 1967". [/INST] SELECT "seat_no_4" FROM "elected_body" WHERE "election"='January 25, 1967'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "elected_body" ( "election" text, "mayor" text, "seat_no_1" text, "seat_no_2" text, "seat_no_3" text, "seat_no_4" text, "seat_no_5" text, "seat_no_6" text ); Write an SQL query that provides the solution to the following question: "Who is seat no 1 when the mayor was john j. seguier". [/INST] SELECT "seat_no_1" FROM "elected_body" WHERE "mayor"='John J. Seguier'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "elected_body" ( "election" text, "mayor" text, "seat_no_1" text, "seat_no_2" text, "seat_no_3" text, "seat_no_4" text, "seat_no_5" text, "seat_no_6" text ); Write an SQL query that provides the solution to the following question: "Who was seat no 6 when seat no 1 and seat no 5 were jacques lachapelle and donald s. dutton". [/INST] SELECT "seat_no_6" FROM "elected_body" WHERE "seat_no_1"='Jacques Lachapelle' AND "seat_no_5"='Donald S. Dutton'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "elected_body" ( "election" text, "mayor" text, "seat_no_1" text, "seat_no_2" text, "seat_no_3" text, "seat_no_4" text, "seat_no_5" text, "seat_no_6" text ); Write an SQL query that provides the solution to the following question: "which election had seat no 1 filled by jacques lachapelle but seat no 5 was filled by g. sanscartier". [/INST] SELECT "election" FROM "elected_body" WHERE "seat_no_1"='Jacques Lachapelle' AND "seat_no_5"='G. Sanscartier'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "season_by_season_record" ( "season" text, "league" text, "division" text, "gp" real, "w" real, "l" real, "t" real, "otl" real, "sol" real, "pts" real, "pct" text, "gf" real, "ga" real, "pim" real, "coach_es" text, "result" text ); Write an SQL query that provides the solution to the following question: "How many season did the team lost in round 1 with a GP of 64?". [/INST] SELECT COUNT("season") FROM "season_by_season_record" WHERE "gp"=64 AND "result"='Lost in round 1'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "season_by_season_record" ( "season" text, "league" text, "division" text, "gp" real, "w" real, "l" real, "t" real, "otl" real, "sol" real, "pts" real, "pct" text, "gf" real, "ga" real, "pim" real, "coach_es" text, "result" text ); Write an SQL query that provides the solution to the following question: "What was the season where the team reached a GP of 244?". [/INST] SELECT "season" FROM "season_by_season_record" WHERE "gf"=244; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "season_by_season_record" ( "season" text, "league" text, "division" text, "gp" real, "w" real, "l" real, "t" real, "otl" real, "sol" real, "pts" real, "pct" text, "gf" real, "ga" real, "pim" real, "coach_es" text, "result" text ); Write an SQL query that provides the solution to the following question: "What was the maximum OTL if L is 28?". [/INST] SELECT MAX("otl") FROM "season_by_season_record" WHERE "l"=28; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "season_by_season_record" ( "season" text, "league" text, "division" text, "gp" real, "w" real, "l" real, "t" real, "otl" real, "sol" real, "pts" real, "pct" text, "gf" real, "ga" real, "pim" real, "coach_es" text, "result" text ); Write an SQL query that provides the solution to the following question: "What was the highest SOL where the team lost in round 3?". [/INST] SELECT MAX("sol") FROM "season_by_season_record" WHERE "result"='Lost in round 3'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "season_by_season_record" ( "season" text, "league" text, "division" text, "gp" real, "w" real, "l" real, "t" real, "otl" real, "sol" real, "pts" real, "pct" text, "gf" real, "ga" real, "pim" real, "coach_es" text, "result" text ); Write an SQL query that provides the solution to the following question: "What was the minimum L if the GA is 272?". [/INST] SELECT MIN("l") FROM "season_by_season_record" WHERE "ga"=272; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_olympic_medalists_in_athletics_m" ( "rank" real, "athlete" text, "nation" text, "olympics" text, "gold" real, "silver" real, "bronze" real, "total_min_2_medals" real ); Write an SQL query that provides the solution to the following question: "What is the least amount of total medals won?". [/INST] SELECT MIN("total_min_2_medals") FROM "list_of_olympic_medalists_in_athletics_m"; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "race_calendar_and_results" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Write an SQL query that provides the solution to the following question: "Who was the driver for the winning team Lawson Team Impul?". [/INST] SELECT "winning_driver" FROM "race_calendar_and_results" WHERE "winning_team"='Lawson Team Impul'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "race_calendar_and_results" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Write an SQL query that provides the solution to the following question: "Who has the fastest lap where Benoît Tréluyer got the pole position?". [/INST] SELECT "fastest_lap" FROM "race_calendar_and_results" WHERE "pole_position"='Benoît Tréluyer'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "race_calendar_and_results" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Write an SQL query that provides the solution to the following question: "What was the earlier round where Takashi Kogure got the fastest lap?". [/INST] SELECT MIN("round") FROM "race_calendar_and_results" WHERE "fastest_lap"='Takashi Kogure'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "race_calendar_and_results" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); Write an SQL query that provides the solution to the following question: "How many drivers drove on Suzuka Circuit where Loïc Duval took pole position?". [/INST] SELECT COUNT("winning_driver") FROM "race_calendar_and_results" WHERE "circuit"='Suzuka Circuit' AND "pole_position"='Loïc Duval'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "one_day_international_matches" ( "s_no" real, "team_a" text, "team_b" text, "winner" text, "margin" text, "match_date" text ); Write an SQL query that provides the solution to the following question: "What date did the West Indies win the match?". [/INST] SELECT "match_date" FROM "one_day_international_matches" WHERE "winner"='West Indies'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "one_day_international_matches" ( "s_no" real, "team_a" text, "team_b" text, "winner" text, "margin" text, "match_date" text ); Write an SQL query that provides the solution to the following question: "How many games were won by a margin of 131 runs?". [/INST] SELECT COUNT("team_a") FROM "one_day_international_matches" WHERE "margin"='131 runs'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "one_day_international_matches" ( "s_no" real, "team_a" text, "team_b" text, "winner" text, "margin" text, "match_date" text ); Write an SQL query that provides the solution to the following question: "Who won the match when the margin was 131 runs?". [/INST] SELECT "winner" FROM "one_day_international_matches" WHERE "margin"='131 runs'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "one_day_international_matches" ( "s_no" real, "team_a" text, "team_b" text, "winner" text, "margin" text, "match_date" text ); Write an SQL query that provides the solution to the following question: "What was the margin of the match on 19 Jan 2002?". [/INST] SELECT "margin" FROM "one_day_international_matches" WHERE "match_date"='19 Jan 2002'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "stroke_play_era_winners" ( "year" real, "champion" text, "country" text, "venue" text, "location_of_venue" text, "winners_score" text, "winners_share" real ); Write an SQL query that provides the solution to the following question: "Where is the Bellerive Country Club venue located?". [/INST] SELECT "location_of_venue" FROM "stroke_play_era_winners" WHERE "venue"='Bellerive Country Club'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "stroke_play_era_winners" ( "year" real, "champion" text, "country" text, "venue" text, "location_of_venue" text, "winners_score" text, "winners_share" real ); Write an SQL query that provides the solution to the following question: "List all winning scores from 1982.". [/INST] SELECT "winners_score" FROM "stroke_play_era_winners" WHERE "year"=1982; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_224794_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "How many vacators were in the Pennsylvania 33rd district?". [/INST] SELECT COUNT("vacator") FROM "table1_224794_3" WHERE "district"='Pennsylvania 33rd'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_224794_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Who was the successor for the Kentucky 2nd district?". [/INST] SELECT "successor" FROM "table1_224794_3" WHERE "district"='Kentucky 2nd'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_224837_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the date successor seated for contested election; served until february 14, 1794". [/INST] SELECT "date_successor_seated" FROM "table1_224837_4" WHERE "reason_for_change"='Contested election; served until February 14, 1794'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_224837_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the date successor seated for delegate seat established". [/INST] SELECT "date_successor_seated" FROM "table1_224837_4" WHERE "reason_for_change"='Delegate seat established'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_224837_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the date successor seated is south carolina 3rd". [/INST] SELECT "date_successor_seated" FROM "table1_224837_4" WHERE "district"='South Carolina 3rd'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "What is the number of vacators when the successor was William H. Wells ( F )?". [/INST] SELECT COUNT("vacator") FROM "senate" WHERE "successor"='William H. Wells ( F )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "What is the total number of dates of successor formal installation when the vacator was Joshua Clayton ( F )?". [/INST] SELECT COUNT("date_of_successors_formal_installation") FROM "senate" WHERE "vacator"='Joshua Clayton ( F )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "What is the total number of successors when the vacator was William North ( F )". [/INST] SELECT COUNT("successor") FROM "senate" WHERE "vacator"='William North ( F )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "What are all the states (class) when the successor was Joseph Anderson ( DR )?". [/INST] SELECT "state_class" FROM "senate" WHERE "successor"='Joseph Anderson ( DR )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "What are all the states (class) when the reason for change was resigned November 26, 1798 and the vacator was John Hunter ( DR )?". [/INST] SELECT "state_class" FROM "senate" WHERE "reason_for_change"='Resigned November 26, 1798' AND "vacator"='John Hunter ( DR )'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225093_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "How many vacators have October 22, 1808 as date successor seated?". [/INST] SELECT COUNT("vacator") FROM "table1_225093_4" WHERE "date_successor_seated"='October 22, 1808'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225093_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "What is the date successor seated where Massachusetts 2nd is the district?". [/INST] SELECT "date_successor_seated" FROM "table1_225093_4" WHERE "district"='Massachusetts 2nd'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225093_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Who is the successor when the reason for change is seat declared vacant January 2, 1808". [/INST] SELECT "successor" FROM "table1_225093_4" WHERE "reason_for_change"='Seat declared vacant January 2, 1808'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225093_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Which district has John Culpepper (f) as the vacator?". [/INST] SELECT "district" FROM "table1_225093_4" WHERE "vacator"='John Culpepper (F)'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225100_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "What is the reason for change when maryland 6th is the district? ". [/INST] SELECT "reason_for_change" FROM "table1_225100_4" WHERE "district"='Maryland 6th'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225100_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Who is the vacator when south carolina 4th is the district?". [/INST] SELECT "vacator" FROM "table1_225100_4" WHERE "district"='South Carolina 4th'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225100_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Who is the successor when florida territory at-large is the district?". [/INST] SELECT "successor" FROM "table1_225100_4" WHERE "district"='Florida Territory At-large'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225102_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the vacator for reason for change died january 12, 1826". [/INST] SELECT "vacator" FROM "table1_225102_4" WHERE "reason_for_change"='Died January 12, 1826'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225102_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the reason for change pennsylvania 13th". [/INST] SELECT "reason_for_change" FROM "table1_225102_4" WHERE "district"='Pennsylvania 13th'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225102_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the vacator for died august 13, 1826". [/INST] SELECT "vacator" FROM "table1_225102_4" WHERE "reason_for_change"='Died August 13, 1826'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225200_3" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Write an SQL query that provides the solution to the following question: "Name the successor for elected january 26, 1837". [/INST] SELECT COUNT("successor") FROM "table1_225200_3" WHERE "date_of_successors_formal_installation"='Elected January 26, 1837'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225204_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the successor for north carolina 13th". [/INST] SELECT "successor" FROM "table1_225204_4" WHERE "district"='North Carolina 13th'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_225204_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Write an SQL query that provides the solution to the following question: "Name the date successor seated for pennsylvania 17th". [/INST] SELECT "date_successor_seated" FROM "table1_225204_4" WHERE "district"='Pennsylvania 17th'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "who are the writer of the series episode number 170?". [/INST] SELECT "written_by" FROM "table1_22580855_1" WHERE "series_no"=170; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "which is the maximun serie episode number when the millions of North American spectators is 3.14?". [/INST] SELECT MAX("series_no") FROM "table1_22580855_1" WHERE "u_s_viewers_millions"='3.14'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "How many writers write the episode whose director is Jonathan Herron?". [/INST] SELECT COUNT("written_by") FROM "table1_22580855_1" WHERE "directed_by"='Jonathan Herron'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "which is the biggest production code?". [/INST] SELECT MAX("production_code") FROM "table1_22580855_1"; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "who are the writers when the production code is 8011?". [/INST] SELECT "written_by" FROM "table1_22580855_1" WHERE "production_code"=8011; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22580855_1" ( "season_no" real, "series_no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); Write an SQL query that provides the solution to the following question: "what is the name of the episode whose writer is Timothy J. Lea and the director is Norberto Barba?". [/INST] SELECT "title" FROM "table1_22580855_1" WHERE "written_by"='Timothy J. Lea' AND "directed_by"='Norberto Barba'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "open_division" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "a_mixed_doubles" text, "b_mixed_doubles" text ); Write an SQL query that provides the solution to the following question: "What is the least year when men's singles is Raju Rai?". [/INST] SELECT MIN("year") FROM "open_division" WHERE "mens_singles"='Raju Rai'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "singles_8_5_titles_3_runners_up" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); Write an SQL query that provides the solution to the following question: "How many outcomes are listed when the final opponent was Johan Kriek? ". [/INST] SELECT COUNT("outcome") FROM "singles_8_5_titles_3_runners_up" WHERE "opponent_in_the_final"='Johan Kriek'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22648285_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Write an SQL query that provides the solution to the following question: "How many miles were driven in the race where the winner finished in 2:47:11?". [/INST] SELECT "miles_km" FROM "table1_22648285_1" WHERE "race_time"='2:47:11'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22648285_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Write an SQL query that provides the solution to the following question: "What date was the race in 1968 run on?". [/INST] SELECT "date" FROM "table1_22648285_1" WHERE "year"=1968; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22648285_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Write an SQL query that provides the solution to the following question: "What year had a race with 301* laps?". [/INST] SELECT "year" FROM "table1_22648285_1" WHERE "laps"='301*'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22648285_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); Write an SQL query that provides the solution to the following question: "How many races did Cale Yarborough win at an average speed of 88.924 mph?". [/INST] SELECT COUNT("race_time") FROM "table1_22648285_1" WHERE "driver"='Cale Yarborough' AND "average_speed_mph"='88.924'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "barclaycard_premiership_fair_play_award" ( "pos" real, "club" text, "games_played" real, "red_yellow_cards" real, "positive_play" real, "respect_toward_opponents" real, "respect_toward_referee" real, "behaviour_of_team_officials" real, "points" real, "score" text, "average" text ); Write an SQL query that provides the solution to the following question: "Name the most pos for west bromwich albion club". [/INST] SELECT MAX("pos") FROM "barclaycard_premiership_fair_play_award" WHERE "club"='West Bromwich Albion'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "barclaycard_premiership_fair_play_award" ( "pos" real, "club" text, "games_played" real, "red_yellow_cards" real, "positive_play" real, "respect_toward_opponents" real, "respect_toward_referee" real, "behaviour_of_team_officials" real, "points" real, "score" text, "average" text ); Write an SQL query that provides the solution to the following question: "Name the points for 212 respect toward opponents". [/INST] SELECT "points" FROM "barclaycard_premiership_fair_play_award" WHERE "respect_toward_opponents"=212; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "barclaycard_premiership_fair_play_award" ( "pos" real, "club" text, "games_played" real, "red_yellow_cards" real, "positive_play" real, "respect_toward_opponents" real, "respect_toward_referee" real, "behaviour_of_team_officials" real, "points" real, "score" text, "average" text ); Write an SQL query that provides the solution to the following question: "Name the pos for west ham united". [/INST] SELECT MIN("pos") FROM "barclaycard_premiership_fair_play_award" WHERE "club"='West Ham United'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "barclaycard_premiership_fair_play_award" ( "pos" real, "club" text, "games_played" real, "red_yellow_cards" real, "positive_play" real, "respect_toward_opponents" real, "respect_toward_referee" real, "behaviour_of_team_officials" real, "points" real, "score" text, "average" text ); Write an SQL query that provides the solution to the following question: "Name the most red/yellow cards for positive play being 255". [/INST] SELECT MAX("red_yellow_cards") FROM "barclaycard_premiership_fair_play_award" WHERE "positive_play"=255; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "current_squad_2008_2009" ( "number" real, "name" text, "height_m" real, "date_of_birth" text, "position" text, "nationality" text ); Write an SQL query that provides the solution to the following question: "Name the date of birth for 27/07/86". [/INST] SELECT "name" FROM "current_squad_2008_2009" WHERE "date_of_birth"='27/07/86'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "current_squad_2008_2009" ( "number" real, "name" text, "height_m" real, "date_of_birth" text, "position" text, "nationality" text ); Write an SQL query that provides the solution to the following question: "Name the least number". [/INST] SELECT MIN("number") FROM "current_squad_2008_2009"; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "current_squad_2008_2009" ( "number" real, "name" text, "height_m" real, "date_of_birth" text, "position" text, "nationality" text ); Write an SQL query that provides the solution to the following question: "Name the nationality for francesco guglielmi". [/INST] SELECT "nationality" FROM "current_squad_2008_2009" WHERE "name"='Francesco Guglielmi'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "current_squad_2008_2009" ( "number" real, "name" text, "height_m" real, "date_of_birth" text, "position" text, "nationality" text ); Write an SQL query that provides the solution to the following question: "Name the height for date of birth being 17/08/75". [/INST] SELECT MIN("height_m") FROM "current_squad_2008_2009" WHERE "date_of_birth"='17/08/75'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "scorers" ( "p" real, "player" text, "league" real, "scottish_cup" real, "league_cup" real, "challenge_cup" real, "total" real ); Write an SQL query that provides the solution to the following question: "How many points did player 7 score in the challenge cup?". [/INST] SELECT COUNT("challenge_cup") FROM "scorers" WHERE "p"=7; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "scorers" ( "p" real, "player" text, "league" real, "scottish_cup" real, "league_cup" real, "challenge_cup" real, "total" real ); Write an SQL query that provides the solution to the following question: "What is Kris doolan's league number?". [/INST] SELECT COUNT("league") FROM "scorers" WHERE "player"='Kris Doolan'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "scorers" ( "p" real, "player" text, "league" real, "scottish_cup" real, "league_cup" real, "challenge_cup" real, "total" real ); Write an SQL query that provides the solution to the following question: "What is bryan hodge's player number". [/INST] SELECT COUNT("p") FROM "scorers" WHERE "player"='Bryan Hodge'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "scorers" ( "p" real, "player" text, "league" real, "scottish_cup" real, "league_cup" real, "challenge_cup" real, "total" real ); Write an SQL query that provides the solution to the following question: "What was the lowest number of points scored in the league cup?". [/INST] SELECT MIN("league_cup") FROM "scorers"; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); Write an SQL query that provides the solution to the following question: "When did the Cowboys score 13 points in 1966?". [/INST] SELECT "date" FROM "schedule" WHERE "cowboys_points"=13; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); Write an SQL query that provides the solution to the following question: "What was the Cowboys' record for Nov. 5, 1966?". [/INST] SELECT "record" FROM "schedule" WHERE "date"='Nov. 5'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22779004_1" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Write an SQL query that provides the solution to the following question: "Who won the regular season when Maryland won the tournament?". [/INST] SELECT "regular_season_winner" FROM "table1_22779004_1" WHERE "tournament_winner"='Maryland'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22779004_1" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Write an SQL query that provides the solution to the following question: "Who won the tournament when Idaho State won the regular season?". [/INST] SELECT "conference_tournament" FROM "table1_22779004_1" WHERE "regular_season_winner"='Idaho State'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22779004_1" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Write an SQL query that provides the solution to the following question: "Who won the regular season when Missouri Valley Conference took place?". [/INST] SELECT "regular_season_winner" FROM "table1_22779004_1" WHERE "conference"='Missouri Valley Conference'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22779004_1" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Write an SQL query that provides the solution to the following question: "What was the conference when Arizona State won the regular season?". [/INST] SELECT "conference" FROM "table1_22779004_1" WHERE "regular_season_winner"='Arizona State'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22779004_1" ( "conference" text, "regular_season_winner" text, "conference_player_of_the_year" text, "conference_tournament" text, "tournament_venue_city" text, "tournament_winner" text ); Write an SQL query that provides the solution to the following question: "Who is the tournament winner in the Atlantic Coast Conference?". [/INST] SELECT "tournament_winner" FROM "table1_22779004_1" WHERE "conference"='Atlantic Coast Conference'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "Which county had a 3.6% unemployment rate?". [/INST] SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "unemployment_rate"='3.6%'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "What is the status of the county that has a 17.3% poverty rate?". [/INST] SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='17.3%'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "What is the market income per capita of the county with the 9.4% poverty rate?". [/INST] SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='9.4%'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "How many status' are there with a population of 90565?". [/INST] SELECT COUNT("status") FROM "list_of_appalachian_regional_commission_" WHERE "population"=90565; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "What is the status of the county with per capita market income of $24,326?". [/INST] SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$24,326'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); Write an SQL query that provides the solution to the following question: "What is the unemployment rate for the county with a market income per capita of $20,958?". [/INST] SELECT COUNT("unemployment_rate") FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$20,958'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22835602_1" ( "no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "viewers_in_millions" text ); Write an SQL query that provides the solution to the following question: "List all who wrote for production code 1ark07.". [/INST] SELECT "written_by" FROM "table1_22835602_1" WHERE "production_code"='1ARK07'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22835602_1" ( "no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "viewers_in_millions" text ); Write an SQL query that provides the solution to the following question: "How many directors were there for the production code 1ark08?". [/INST] SELECT COUNT("directed_by") FROM "table1_22835602_1" WHERE "production_code"='1ARK08'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22835602_1" ( "no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "viewers_in_millions" text ); Write an SQL query that provides the solution to the following question: "How many millions of people viewed "Father's Day"?". [/INST] SELECT "viewers_in_millions" FROM "table1_22835602_1" WHERE "title"='\"Father''s Day\"'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22835602_1" ( "no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "viewers_in_millions" text ); Write an SQL query that provides the solution to the following question: "List all directors from episodes with viewership of 1.945 million.". [/INST] SELECT "directed_by" FROM "table1_22835602_1" WHERE "viewers_in_millions"='1.945'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "table1_22835602_1" ( "no" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "viewers_in_millions" text ); Write an SQL query that provides the solution to the following question: "What is the original air date for production code 1ark79?". [/INST] SELECT "original_air_date" FROM "table1_22835602_1" WHERE "production_code"='1ARK79'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "doubles_17" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "w_l" text, "result" text ); Write an SQL query that provides the solution to the following question: "How many rounds were there in the 2006 davis cup europe/africa group I?". [/INST] SELECT COUNT("round") FROM "doubles_17" WHERE "edition"='2006 Davis Cup Europe/Africa Group I'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "series" text ); Write an SQL query that provides the solution to the following question: "Where does the team play May 3?". [/INST] SELECT "team" FROM "game_log" WHERE "date"='May 3'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Write an SQL query that provides the solution to the following question: "What team was the game on February 27 played against?". [/INST] SELECT "team" FROM "game_log" WHERE "date"='February 27'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Write an SQL query that provides the solution to the following question: "What was the score of the game in which Brook Lopez (8) did the high rebounds?". [/INST] SELECT "score" FROM "game_log" WHERE "high_rebounds"='Brook Lopez (8)'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Write an SQL query that provides the solution to the following question: "Who did the high assists in the game played on February 9?". [/INST] SELECT "high_assists" FROM "game_log" WHERE "date"='February 9'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Write an SQL query that provides the solution to the following question: "What was the record in the game against Memphis?". [/INST] SELECT "record" FROM "game_log" WHERE "team"='Memphis'; </s>
<s>[INST] You are given the following SQL table structure described by CREATE TABLE statement: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); Write an SQL query that provides the solution to the following question: "What's the highest game number for a game in which Kris Humphries (8) did the high rebounds?". [/INST] SELECT MAX("game") FROM "game_log" WHERE "high_rebounds"='Kris Humphries (8)'; </s>