text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "opinion_polls" ( "source" text, "date" text, "de_sus" text, "zares" text, "nlpd" text ); Question: What is the source for Zares at 8.6%? <|assistant|> SELECT "source" FROM "opinion_polls" WHERE "zares"='8.6%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "opinion_polls" ( "source" text, "date" text, "de_sus" text, "zares" text, "nlpd" text ); Question: What is the source corresponding to a date of May 25–27? <|assistant|> SELECT "source" FROM "opinion_polls" WHERE "date"='may 25–27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "volume_issue" text, "issue_date_s" text, "weeks_on_top" real, "song" text, "artist" text ); Question: What song is done by Terence Trent D'Arby? <|assistant|> SELECT "song" FROM "see_also" WHERE "artist"='terence trent d''arby';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); Question: What was the Result on October 27, 2002? <|assistant|> SELECT "result" FROM "schedule" WHERE "date"='october 27, 2002';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: in riyadh, saudi arabia, what is the score? <|assistant|> SELECT "score" FROM "international_goals" WHERE "venue"='riyadh, saudi arabia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_people" ( "ethnic_group" text, "totora_municipality_pct" real, "pojo_municipality_pct" real, "pocona_municipality_pct" real, "chimor_municipality_pct" real, "puerto_villarroel_municipality_pct" real, "entre_r_os_municipality_pct" real ); Question: Which Pocona Municipality (%) is the lowest one that has a Puerto Villarroel Municipality (%) smaller than 14.6, and a Chimoré Municipality (%) of 5.1, and an Entre Ríos Municipality (%) smaller than 0.9? <|assistant|> SELECT MIN("pocona_municipality_pct") FROM "the_people" WHERE "puerto_villarroel_municipality_pct"<14.6 AND "chimor_municipality_pct"=5.1 AND "entre_r_os_municipality_pct"<0.9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_people" ( "ethnic_group" text, "totora_municipality_pct" real, "pojo_municipality_pct" real, "pocona_municipality_pct" real, "chimor_municipality_pct" real, "puerto_villarroel_municipality_pct" real, "entre_r_os_municipality_pct" real ); Question: Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4? <|assistant|> SELECT MIN("puerto_villarroel_municipality_pct") FROM "the_people" WHERE "ethnic_group"='not indigenous' AND "totora_municipality_pct"<4.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_people" ( "ethnic_group" text, "totora_municipality_pct" real, "pojo_municipality_pct" real, "pocona_municipality_pct" real, "chimor_municipality_pct" real, "puerto_villarroel_municipality_pct" real, "entre_r_os_municipality_pct" real ); Question: Which Pocona Municipality (%) has a Puerto Villarroel Municipality (%) larger than 14.6, and a Pojo Municipality (%) smaller than 88.5? <|assistant|> SELECT SUM("pocona_municipality_pct") FROM "the_people" WHERE "puerto_villarroel_municipality_pct">14.6 AND "pojo_municipality_pct"<88.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_people" ( "ethnic_group" text, "totora_municipality_pct" real, "pojo_municipality_pct" real, "pocona_municipality_pct" real, "chimor_municipality_pct" real, "puerto_villarroel_municipality_pct" real, "entre_r_os_municipality_pct" real ); Question: Which Totora Municipality (%) is the highest one that has a Chimoré Municipality (%) of 5.1, and a Pocona Municipality (%) smaller than 0.2? <|assistant|> SELECT MAX("totora_municipality_pct") FROM "the_people" WHERE "chimor_municipality_pct"=5.1 AND "pocona_municipality_pct"<0.2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "camping_world_200" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text ); Question: Which Pos has a Car # smaller than 18, and a Driver of mike skinner? <|assistant|> SELECT AVG("pos") FROM "camping_world_200" WHERE "car_num"<18 AND "driver"='mike skinner';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "camping_world_200" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text ); Question: Which Team has a Pos larger than 3, and a Make of toyota, and a Car # smaller than 59, and a Driver of mike skinner? <|assistant|> SELECT "team" FROM "camping_world_200" WHERE "pos">3 AND "make"='toyota' AND "car_num"<59 AND "driver"='mike skinner';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "camping_world_200" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text ); Question: Which Pos has a Team of roush fenway racing, and a Car # of 99? <|assistant|> SELECT SUM("pos") FROM "camping_world_200" WHERE "team"='roush fenway racing' AND "car_num"=99;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "camping_world_200" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text ); Question: Which Car # has a Make of toyota, and a Pos of 7? <|assistant|> SELECT AVG("car_num") FROM "camping_world_200" WHERE "make"='toyota' AND "pos"=7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "camping_world_200" ( "pos" real, "car_num" real, "driver" text, "make" text, "team" text ); Question: Which Pos has a Team of germian racing? <|assistant|> SELECT "pos" FROM "camping_world_200" WHERE "team"='germian racing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "series" text ); Question: Which Opponent has a Score of 2–6? <|assistant|> SELECT "opponent" FROM "playoffs" WHERE "score"='2–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "series" text ); Question: Which Game has a Series of flyers win 3–0? Question 3 <|assistant|> SELECT MAX("game") FROM "playoffs" WHERE "series"='flyers win 3–0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "series" text ); Question: Which Series is on april 18? <|assistant|> SELECT "series" FROM "playoffs" WHERE "date"='april 18';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: Name the date with score of 9-2 <|assistant|> SELECT "date" FROM "game_log" WHERE "score"='9-2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "liberec" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which Points is the highest one that has a Nationality of aut, and a Name of thomas morgenstern? <|assistant|> SELECT MAX("points") FROM "liberec" WHERE "nationality"='aut' AND "name"='thomas morgenstern';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "liberec" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which Name has a 2nd (m) larger than 128.5, and Points of 260.8? <|assistant|> SELECT "name" FROM "liberec" WHERE "2nd_m">128.5 AND "points"=260.8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed_onshore_wind_farms" ( "wind_farm" text, "capacity_mw" real, "turbines" real, "turbine_vendor" text, "size_mw" text, "county" text ); Question: What is the sum of the capacities for Carrigh wind warm that has a size of 0.85 MW and more than 3 turbines? <|assistant|> SELECT SUM("capacity_mw") FROM "completed_onshore_wind_farms" WHERE "size_mw"='0.85' AND "wind_farm"='carrigh' AND "turbines">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed_onshore_wind_farms" ( "wind_farm" text, "capacity_mw" real, "turbines" real, "turbine_vendor" text, "size_mw" text, "county" text ); Question: What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon? <|assistant|> SELECT "size_mw" FROM "completed_onshore_wind_farms" WHERE "turbines">19 AND "turbine_vendor"='enercon' AND "county"='wexford';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "completed_onshore_wind_farms" ( "wind_farm" text, "capacity_mw" real, "turbines" real, "turbine_vendor" text, "size_mw" text, "county" text ); Question: Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbines with a size of 0.85 MW? <|assistant|> SELECT "turbine_vendor" FROM "completed_onshore_wind_farms" WHERE "turbines"<6 AND "county"='donegal' AND "size_mw"='0.85' AND "wind_farm"='meenadreen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" ( "rank" real, "place" text, "county" text, "per_capita_income" text, "median_house_hold_income" text, "median_family_income" text, "population" real, "number_of_households" real ); Question: What is the population where the rank is higher than 51 and the Median House-hold income is $25,250? <|assistant|> SELECT SUM("population") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "rank">51 AND "median_house_hold_income"='$25,250';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" ( "rank" real, "place" text, "county" text, "per_capita_income" text, "median_house_hold_income" text, "median_family_income" text, "population" real, "number_of_households" real ); Question: What is the Population where the Median House-hold Income is $25,016? <|assistant|> SELECT MIN("population") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "median_house_hold_income"='$25,016';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" ( "rank" real, "place" text, "county" text, "per_capita_income" text, "median_house_hold_income" text, "median_family_income" text, "population" real, "number_of_households" real ); Question: What is the Number of Households that have a Per Capita Income of $21,345? <|assistant|> SELECT AVG("number_of_households") FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "per_capita_income"='$21,345';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_mexico_places_ranked_by_per_capita_i" ( "rank" real, "place" text, "county" text, "per_capita_income" text, "median_house_hold_income" text, "median_family_income" text, "population" real, "number_of_households" real ); Question: What County has a Median Family Income of $79,331? <|assistant|> SELECT "county" FROM "new_mexico_places_ranked_by_per_capita_i" WHERE "median_family_income"='$79,331';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: The United States, with a total medal count of less than 171, and a bronze medal count less than 9, has how many gold medals? <|assistant|> SELECT MAX("gold") FROM "world_championships_total_medals" WHERE "total"<171 AND "nation"='united states' AND "bronze"<9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many total gold medals did Australia receive? <|assistant|> SELECT COUNT("gold") FROM "world_championships_total_medals" WHERE "nation"='australia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many total bronze medals did Canada receive? <|assistant|> SELECT MAX("bronze") FROM "world_championships_total_medals" WHERE "nation"='canada';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many total gold medals did India receive? <|assistant|> SELECT "gold" FROM "world_championships_total_medals" WHERE "nation"='india';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_doubles" ( "tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "career_w_l" text ); Question: Which 1997's accompanying 1991 was a when the tournament was the australian open? <|assistant|> SELECT "1997" FROM "mixed_doubles" WHERE "1991"='a' AND "tournament"='australian open';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_doubles" ( "tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "career_w_l" text ); Question: Which 1997's 1992 was 1r when 1994 was a? <|assistant|> SELECT "1997" FROM "mixed_doubles" WHERE "1992"='1r' AND "1994"='a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_doubles" ( "tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "career_w_l" text ); Question: Which 1995's tournament was the French Open? <|assistant|> SELECT "1995" FROM "mixed_doubles" WHERE "tournament"='french open';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_doubles" ( "tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "career_w_l" text ); Question: Which 1989's 1991 and 1994 stats were 1r? <|assistant|> SELECT "1989" FROM "mixed_doubles" WHERE "1991"='1r' AND "1994"='1r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_doubles" ( "tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "career_w_l" text ); Question: Which 1990s 1992 was 3r? <|assistant|> SELECT "1990" FROM "mixed_doubles" WHERE "1992"='3r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which Linda McCartney has a Stuart of electric guitar? <|assistant|> SELECT "linda_mc_cartney" FROM "instruments_played_by_band_members" WHERE "stuart"='electric guitar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which Whitten has a Stuart of bass, and a Paul McCartney of electric guitar? <|assistant|> SELECT "whitten" FROM "instruments_played_by_band_members" WHERE "stuart"='bass' AND "paul_mc_cartney"='electric guitar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which McIntosh has a Whitten of drums, and a Stuart of bass, and a Paul McCartney of electric guitar? <|assistant|> SELECT "mc_intosh" FROM "instruments_played_by_band_members" WHERE "whitten"='drums' AND "stuart"='bass' AND "paul_mc_cartney"='electric guitar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which Paul McCartney has a Linda McCartney of keyboards? <|assistant|> SELECT "paul_mc_cartney" FROM "instruments_played_by_band_members" WHERE "linda_mc_cartney"='keyboards';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum? <|assistant|> SELECT "mc_intosh" FROM "instruments_played_by_band_members" WHERE "stuart"='bass' AND "linda_mc_cartney"='keyboards or drum';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "instruments_played_by_band_members" ( "paul_mc_cartney" text, "stuart" text, "mc_intosh" text, "whitten" text, "linda_mc_cartney" text ); Question: Which Paul McCartney has a Linda McCartney of keyboards or drum? <|assistant|> SELECT "paul_mc_cartney" FROM "instruments_played_by_band_members" WHERE "linda_mc_cartney"='keyboards or drum';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "superbike_race_2_classification" ( "rider" text, "bike" text, "laps" real, "time" text, "grid" real ); Question: What is the largest Grid that has a Bike of honda cbr1000rr, and a Time of +20.848, and a Lap greater than 24? <|assistant|> SELECT MAX("grid") FROM "superbike_race_2_classification" WHERE "bike"='honda cbr1000rr' AND "time"='+20.848' AND "laps">24;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: D'Oyly Carte 1920 Tour of hugh enes blackmore is what D'Oyly Carte 1930 Tour? <|assistant|> SELECT "d_oyly_carte_1930_tour" FROM "historical_casting" WHERE "d_oyly_carte_1920_tour"='hugh enes blackmore';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: D'Oyly Carte 1939 Tour of richard walker involves what D'Oyly Carte 1945 Tour? <|assistant|> SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1939_tour"='richard walker';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: D'Oyly Carte 1920 Tour of james turnbull is what D'Oyly Carte 1945 Tour? <|assistant|> SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1920_tour"='james turnbull';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: Role of wilfred is what D'Oyly Carte 1945 Tour? <|assistant|> SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "role"='wilfred';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: D'Oyly Carte 1939 Tour of sydney granville had what D'Oyly Carte 1950 Tour <|assistant|> SELECT "d_oyly_carte_1950_tour" FROM "historical_casting" WHERE "d_oyly_carte_1939_tour"='sydney granville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "historical_casting" ( "role" text, "d_oyly_carte_1920_tour" text, "d_oyly_carte_1930_tour" text, "d_oyly_carte_1939_tour" text, "d_oyly_carte_1945_tour" text, "d_oyly_carte_1950_tour" text ); Question: D'Oyly Carte 1930 Tour of john dean involved what D'Oyly Carte 1945 Tour? <|assistant|> SELECT "d_oyly_carte_1945_tour" FROM "historical_casting" WHERE "d_oyly_carte_1930_tour"='john dean';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: The nation of denmark has what average total nad more than 0 gold? <|assistant|> SELECT AVG("total") FROM "medal_table" WHERE "nation"='denmark' AND "gold">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: Switzerland has how many gold and less than 0 silver? <|assistant|> SELECT MAX("gold") FROM "medal_table" WHERE "nation"='switzerland' AND "silver"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); Question: How many wins does the player ranked lower than 3 with earnings of $3,315,502 have? <|assistant|> SELECT SUM("wins") FROM "leaders" WHERE "rank">3 AND "earnings">'3,315,502';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); Question: What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4? <|assistant|> SELECT MAX("wins") FROM "leaders" WHERE "earnings"<'4,976,980' AND "rank">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_lancashire_totals" ( "score" text, "opposition" text, "venue" text, "city" text, "year" real ); Question: How many years had a score of 734-5d? <|assistant|> SELECT COUNT("year") FROM "highest_lancashire_totals" WHERE "score"='734-5d';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_lancashire_totals" ( "score" text, "opposition" text, "venue" text, "city" text, "year" real ); Question: Which venue had a city of Manchester before 2003? <|assistant|> SELECT "venue" FROM "highest_lancashire_totals" WHERE "city"='manchester' AND "year"<2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_lancashire_totals" ( "score" text, "opposition" text, "venue" text, "city" text, "year" real ); Question: Which venue had a city of Manchester in 2003? <|assistant|> SELECT "venue" FROM "highest_lancashire_totals" WHERE "city"='manchester' AND "year"=2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_lancashire_totals" ( "score" text, "opposition" text, "venue" text, "city" text, "year" real ); Question: Which venue had a score of 734-5d? <|assistant|> SELECT "venue" FROM "highest_lancashire_totals" WHERE "score"='734-5d';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the average number of top-5s for the major with 5 top-10s and fewer than 12 cuts made? <|assistant|> SELECT AVG("top_5") FROM "summary" WHERE "top_10"=5 AND "cuts_made"<12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made? <|assistant|> SELECT AVG("top_10") FROM "summary" WHERE "top_25"=2 AND "cuts_made"<10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the total number of top-25s for the major that has 11 top-10s? <|assistant|> SELECT COUNT("top_25") FROM "summary" WHERE "top_10"=11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: How many total events have cuts made over 12, more than 2 top-5s, and more than 11 top-10s? <|assistant|> SELECT SUM("events") FROM "summary" WHERE "cuts_made">12 AND "top_5">2 AND "top_10">11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: How many total wins are associated with events with 1 top-10? <|assistant|> SELECT SUM("wins") FROM "summary" WHERE "top_10"=1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the average number of cuts made in events with fewer than 1 win and exactly 11 top-10s? <|assistant|> SELECT AVG("cuts_made") FROM "summary" WHERE "top_10"=11 AND "wins"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); Question: What week did they have a bye? <|assistant|> SELECT "week" FROM "schedule" WHERE "date"='bye';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); Question: What tournament in 2006 had a score of 0-0? <|assistant|> SELECT "tournament" FROM "singles_performance_timeline" WHERE "2006"='0-0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "michigan_63_oberlin_0" ( "player" text, "touchdowns" real, "extra_points" real, "field_goals" real, "points" real ); Question: What was the highest number of extra points scored by Albert Herrnstein, when he scored more than 15 points total? <|assistant|> SELECT MAX("extra_points") FROM "michigan_63_oberlin_0" WHERE "player"='albert herrnstein' AND "points">15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "michigan_63_oberlin_0" ( "player" text, "touchdowns" real, "extra_points" real, "field_goals" real, "points" real ); Question: How many touchdowns were scored by William Cole? <|assistant|> SELECT "touchdowns" FROM "michigan_63_oberlin_0" WHERE "player"='william cole';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: For the game with 26,236 attendance, what was the record? <|assistant|> SELECT "record" FROM "game_log" WHERE "attendance"='26,236';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: What's the record for the game with an attendance of 49,222? <|assistant|> SELECT "record" FROM "game_log" WHERE "attendance"='49,222';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema 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 ); Question: Who had the most rebounds and how many did he have during the game on June 11? <|assistant|> SELECT "high_rebounds" FROM "game_log" WHERE "date"='june 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema 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 ); Question: Who was the leading scorer and how many did he score for the game on June 13? <|assistant|> SELECT "high_points" FROM "game_log" WHERE "date"='june 13';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nhl_amateur_draft" ( "round" real, "pick" real, "player" text, "nationality" text, "college_junior_club_team" text ); Question: What College/Junior/Club Team has Pick 50 before Round 8? <|assistant|> SELECT "college_junior_club_team" FROM "nhl_amateur_draft" WHERE "round"<8 AND "pick"=50;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" real, "slalom" text, "giant_slalom" real, "super_g" real, "downhill" text, "combined" text ); Question: What is the highest overall prior to 1996 with a slalom of 39? <|assistant|> SELECT MAX("overall") FROM "season_standings" WHERE "slalom"='39' AND "season"<1996;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" real, "slalom" text, "giant_slalom" real, "super_g" real, "downhill" text, "combined" text ); Question: What is the lowest overall score prior to 1992 with a downhill score of 1? <|assistant|> SELECT MIN("overall") FROM "season_standings" WHERE "downhill"='1' AND "season"<1992;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" real, "slalom" text, "giant_slalom" real, "super_g" real, "downhill" text, "combined" text ); Question: What was her Giant Slalom score when her Overall was greater than 3 and her Super G score was 12? <|assistant|> SELECT "giant_slalom" FROM "season_standings" WHERE "overall">3 AND "super_g"=12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" real, "slalom" text, "giant_slalom" real, "super_g" real, "downhill" text, "combined" text ); Question: What was her highest Super G score with a Slalom score of 58 and an Overall larger than 2? <|assistant|> SELECT MAX("super_g") FROM "season_standings" WHERE "slalom"='58' AND "overall">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_interchanges_and_features" ( "name" text, "dist_from_origin" text, "dist_from_terminus" text, "speed_limit" text, "location_all_in_nagano" text ); Question: What location has the name of Sakakita BS? <|assistant|> SELECT "location_all_in_nagano" FROM "list_of_interchanges_and_features" WHERE "name"='sakakita bs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_interchanges_and_features" ( "name" text, "dist_from_origin" text, "dist_from_terminus" text, "speed_limit" text, "location_all_in_nagano" text ); Question: Which location includes Sakakita BS? <|assistant|> SELECT "location_all_in_nagano" FROM "list_of_interchanges_and_features" WHERE "name"='sakakita bs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_interchanges_and_features" ( "name" text, "dist_from_origin" text, "dist_from_terminus" text, "speed_limit" text, "location_all_in_nagano" text ); Question: What is the distance from origin in Azumino including Toyoshina IC? <|assistant|> SELECT "dist_from_origin" FROM "list_of_interchanges_and_features" WHERE "location_all_in_nagano"='azumino' AND "name"='toyoshina ic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate" ( "district" text, "name" text, "party" text, "hometown" text, "first_elected" real, "towns_represented" text ); Question: Which district had first elected earlier than 2006 for representation of Broken Arrow, Tulsa? <|assistant|> SELECT "district" FROM "senate" WHERE "first_elected"<2006 AND "towns_represented"='broken arrow, tulsa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate" ( "district" text, "name" text, "party" text, "hometown" text, "first_elected" real, "towns_represented" text ); Question: How many values of first elected are for district 16? <|assistant|> SELECT COUNT("first_elected") FROM "senate" WHERE "district"='16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "senate" ( "district" text, "name" text, "party" text, "hometown" text, "first_elected" real, "towns_represented" text ); Question: Which towns are represented in district 31? <|assistant|> SELECT "towns_represented" FROM "senate" WHERE "district"='31';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "financial_comparisons_between_top_10_ban" ( "bank" text, "asset" real, "loans" real, "npl_net" text, "deposits" real, "net_interest_income" real, "non_interest_income" real, "net_profit" real, "no_of_employees" text, "no_of_branches_offices" real, "no_of_at_ms" text ); Question: How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offices less than 17? <|assistant|> SELECT COUNT("deposits") FROM "financial_comparisons_between_top_10_ban" WHERE "non_interest_income"=0.9500000000000001 AND "no_of_branches_offices"<17;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "financial_comparisons_between_top_10_ban" ( "bank" text, "asset" real, "loans" real, "npl_net" text, "deposits" real, "net_interest_income" real, "non_interest_income" real, "net_profit" real, "no_of_employees" text, "no_of_branches_offices" real, "no_of_at_ms" text ); Question: Which NPL net's bank was citibank? <|assistant|> SELECT "npl_net" FROM "financial_comparisons_between_top_10_ban" WHERE "bank"='citibank';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins_5" ( "year" real, "championship" text, "54_holes" text, "winning_score" text, "margin" text, "runner_s_up" text ); Question: Which championship has a winning score of (77-76-74-73=300)? <|assistant|> SELECT "championship" FROM "wins_5" WHERE "winning_score"='(77-76-74-73=300)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins_5" ( "year" real, "championship" text, "54_holes" text, "winning_score" text, "margin" text, "runner_s_up" text ); Question: Which championship has a margin of 8 strokes? <|assistant|> SELECT "championship" FROM "wins_5" WHERE "margin"='8 strokes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins_5" ( "year" real, "championship" text, "54_holes" text, "winning_score" text, "margin" text, "runner_s_up" text ); Question: Which championship has a 5 shot lead for 54 holes? <|assistant|> SELECT "championship" FROM "wins_5" WHERE "54_holes"='5 shot lead';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins_5" ( "year" real, "championship" text, "54_holes" text, "winning_score" text, "margin" text, "runner_s_up" text ); Question: What is the 54 holes for The Open Championship (4)? <|assistant|> SELECT "54_holes" FROM "wins_5" WHERE "championship"='the open championship (4)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); Question: Which Tournament has a 2007 of wta premier 5 tournaments? <|assistant|> SELECT "tournament" FROM "doubles_performance_timeline" WHERE "2007"='wta premier 5 tournaments';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); Question: Which Tournament was played in NH in 2011? <|assistant|> SELECT "tournament" FROM "doubles_performance_timeline" WHERE "2011"='nh';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); Question: Which Tournament has a 2010 of 2r, and a 2011 of 1r? <|assistant|> SELECT "tournament" FROM "doubles_performance_timeline" WHERE "2010"='2r' AND "2011"='1r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "banknotes" ( "value" text, "color" text, "obverse" text, "reverse" text, "first_issued" real ); Question: When was Color of green first issued? <|assistant|> SELECT MIN("first_issued") FROM "banknotes" WHERE "color"='green';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "banknotes" ( "value" text, "color" text, "obverse" text, "reverse" text, "first_issued" real ); Question: When was Color of green last issued? <|assistant|> SELECT MAX("first_issued") FROM "banknotes" WHERE "color"='green';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "banknotes" ( "value" text, "color" text, "obverse" text, "reverse" text, "first_issued" real ); Question: What reverse has a color of green? <|assistant|> SELECT "reverse" FROM "banknotes" WHERE "color"='green';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "banknotes" ( "value" text, "color" text, "obverse" text, "reverse" text, "first_issued" real ); Question: How much was a Reverse of guitar of agustín pío barrios before 1998? <|assistant|> SELECT "value" FROM "banknotes" WHERE "first_issued"<1998 AND "reverse"='guitar of agustín pío barrios';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is BYU's lowest pick? <|assistant|> SELECT MIN("pick_num") FROM "atlanta_falcons_draft_history" WHERE "college"='byu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: Which cornerback round has a pick number lower than 26 and an overall higher than 41? <|assistant|> SELECT SUM("round") FROM "atlanta_falcons_draft_history" WHERE "pick_num"<26 AND "position"='cornerback' AND "overall">41;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the overall number for the College of Wyoming? <|assistant|> SELECT COUNT("overall") FROM "atlanta_falcons_draft_history" WHERE "college"='wyoming';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the total round for a wide receiver with an overall of more than 145? <|assistant|> SELECT COUNT("round") FROM "atlanta_falcons_draft_history" WHERE "position"='wide receiver' AND "overall">145;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is College of Ohio State's pick number with an overall lower than 145? <|assistant|> SELECT "pick_num" FROM "atlanta_falcons_draft_history" WHERE "overall"<145 AND "college"='ohio state';<|endoftext|>