text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fleet" ( "type" text, "owns" text, "length" text, "delivery_date" text, "gross_tonnage" real ); Question: with delivery date of 2001 2001 what is the owns? <|assistant|> SELECT "owns" FROM "fleet" WHERE "delivery_date"='2001 2001';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fleet" ( "type" text, "owns" text, "length" text, "delivery_date" text, "gross_tonnage" real ); Question: with delivery date of 2001 2001 what is gross tonnage? <|assistant|> SELECT AVG("gross_tonnage") FROM "fleet" WHERE "delivery_date"='2001 2001';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fleet" ( "type" text, "owns" text, "length" text, "delivery_date" text, "gross_tonnage" real ); Question: with delivery date 1997 1997 what is the owns? <|assistant|> SELECT "owns" FROM "fleet" WHERE "delivery_date"='1997 1997';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "location" text, "founded" real, "type" text, "enrollment" real, "joined" real, "left" real, "nickname" text, "present_conference" text ); Question: Which conference does the school from Gainesville, Florida, play in? <|assistant|> SELECT "present_conference" FROM "see_also" WHERE "location"='gainesville, florida';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "location" text, "founded" real, "type" text, "enrollment" real, "joined" real, "left" real, "nickname" text, "present_conference" text ); Question: What is the number of enrollments for teams named the Buccaneers founded before 1911? <|assistant|> SELECT COUNT("enrollment") FROM "see_also" WHERE "nickname"='buccaneers' AND "founded"<1911;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "date" text, "title" text, "origin" text, "label_cat_no" text, "chart_no" real ); Question: What is the highest chart number for the song Yardbirds aka Roger the Engineer? <|assistant|> SELECT MAX("chart_no") FROM "studio_albums" WHERE "title"='yardbirds aka roger the engineer';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "date" text, "title" text, "origin" text, "label_cat_no" text, "chart_no" real ); Question: What is the average chart number for 11/1965? <|assistant|> SELECT AVG("chart_no") FROM "studio_albums" WHERE "date"='11/1965';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "date" text, "title" text, "origin" text, "label_cat_no" text, "chart_no" real ); Question: What is origin country for a title that charted at 52? <|assistant|> SELECT "origin" FROM "studio_albums" WHERE "chart_no"=52;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); Question: What is the Record of the Game after 40 with New York Rangers as Opponent? <|assistant|> SELECT "record" FROM "regular_season" WHERE "game">40 AND "opponent"='new york rangers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: When did Adam Thompson play in the final? <|assistant|> SELECT "date" FROM "singles_titles" WHERE "opponent_in_the_final"='adam thompson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: When was the Lagos tournament? <|assistant|> SELECT "date" FROM "singles_titles" WHERE "tournament"='lagos';<|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: What was the score against the phillies on may 24? <|assistant|> SELECT "score" FROM "game_log" WHERE "opponent"='phillies' AND "date"='may 24';<|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, "record" text, "game_site" text, "attendance" text ); Question: Opponent of new england patriots had what attendance? <|assistant|> SELECT "attendance" FROM "schedule" WHERE "opponent"='new england patriots';<|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, "record" text, "game_site" text, "attendance" text ); Question: Attendance of 55,340 had what opponent? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "attendance"='55,340';<|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, "record" text, "game_site" text, "attendance" text ); Question: Week smaller than 4, and a Game Site of rca dome, and a Opponent of new england patriots involves what date? <|assistant|> SELECT "date" FROM "schedule" WHERE "week"<4 AND "game_site"='rca dome' AND "opponent"='new england patriots';<|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, "record" text, "game_site" text, "attendance" text ); Question: Record of 0–8 had what result? <|assistant|> SELECT "result" FROM "schedule" WHERE "record"='0–8';<|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, "record" text, "game_site" text, "attendance" text ); Question: Record of 0–8 had what lowest week? <|assistant|> SELECT MIN("week") FROM "schedule" WHERE "record"='0–8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); Question: What was the score when the visitor was pittsburgh? <|assistant|> SELECT "score" FROM "regular_season" WHERE "visitor"='pittsburgh';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); Question: What was the decision on November 26? <|assistant|> SELECT "decision" FROM "regular_season" WHERE "date"='november 26';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_individual_rankings" ( "location_state_city" text, "usn_2013" real, "bw_2013" real, "forbes_2011" real, "ec_2013" real, "ft_2011" real, "ae_2011" real, "cnn_2011" real, "bi_2013" real, "arwu_2012" real ); Question: What is the BW 2013 ranking of Washington, D.C., which has an ARWU 2012 ranking greater than 51? <|assistant|> SELECT "bw_2013" FROM "current_individual_rankings" WHERE "arwu_2012">51 AND "location_state_city"='washington, d.c.';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_individual_rankings" ( "location_state_city" text, "usn_2013" real, "bw_2013" real, "forbes_2011" real, "ec_2013" real, "ft_2011" real, "ae_2011" real, "cnn_2011" real, "bi_2013" real, "arwu_2012" real ); Question: What is the USN 2013 ranking with a BW 2013 ranking less than 1000, a Forbes 2011 ranking larger than 17, and a CNN 2011 ranking less than 13? <|assistant|> SELECT SUM("usn_2013") FROM "current_individual_rankings" WHERE "bw_2013"<1000 AND "forbes_2011">17 AND "cnn_2011"<13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_individual_rankings" ( "location_state_city" text, "usn_2013" real, "bw_2013" real, "forbes_2011" real, "ec_2013" real, "ft_2011" real, "ae_2011" real, "cnn_2011" real, "bi_2013" real, "arwu_2012" real ); Question: What is the average AE 2011 ranking with a Forbes 2011 ranking of 24 and a FT 2011 ranking less than 44? <|assistant|> SELECT AVG("ae_2011") FROM "current_individual_rankings" WHERE "forbes_2011"=24 AND "ft_2011"<44;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_individual_rankings" ( "location_state_city" text, "usn_2013" real, "bw_2013" real, "forbes_2011" real, "ec_2013" real, "ft_2011" real, "ae_2011" real, "cnn_2011" real, "bi_2013" real, "arwu_2012" real ); Question: What is the average ARWU 2012 ranking of Illinois, Champaign, which has a USN 2013 ranking less than 91 and an EC 2013 ranking larger than 1000? <|assistant|> SELECT AVG("arwu_2012") FROM "current_individual_rankings" WHERE "usn_2013"<91 AND "location_state_city"='illinois, champaign' AND "ec_2013">1000;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_individual_rankings" ( "location_state_city" text, "usn_2013" real, "bw_2013" real, "forbes_2011" real, "ec_2013" real, "ft_2011" real, "ae_2011" real, "cnn_2011" real, "bi_2013" real, "arwu_2012" real ); Question: What is the average BW 2013 ranking of Texas, Fort Worth, which has an AE 2011 ranking of 1000 and an FT 2011 ranking less than 1000? <|assistant|> SELECT AVG("bw_2013") FROM "current_individual_rankings" WHERE "ae_2011"=1000 AND "location_state_city"='texas, fort worth' AND "ft_2011"<1000;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "time_et" text, "result" text, "game_site" text, "record" text, "nfl_recap" text ); Question: Who did they play at lincoln financial field at 8:30 (ET) after week 14? <|assistant|> SELECT "opponent" FROM "regular_season" WHERE "week">14 AND "game_site"='lincoln financial field' AND "time_et"='8:30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administration" ( "commune" text, "area_km_2" real, "2002_population" real, "density_km_2" real, "government_website" text ); Question: What is the density for the area that is larger than 4,015.6 and a population smaller than 6,178? <|assistant|> SELECT COUNT("density_km_2") FROM "administration" WHERE "area_km_2">'4,015.6' AND "2002_population"<'6,178';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administration" ( "commune" text, "area_km_2" real, "2002_population" real, "density_km_2" real, "government_website" text ); Question: What is the density that has an area smaller than 2,200.2 and a population larger than 2,599? <|assistant|> SELECT COUNT("density_km_2") FROM "administration" WHERE "area_km_2"<'2,200.2' AND "2002_population">'2,599';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the average rank for nations with fewer than 0 gold medals? <|assistant|> SELECT AVG("rank") FROM "medal_table" WHERE "gold"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the total number of bronze medals with more than 1 medal total and fewer than 1 silver medal? <|assistant|> SELECT COUNT("bronze") FROM "medal_table" WHERE "total">1 AND "silver"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the highest rank of a nation with fewer than 0 silver medals? <|assistant|> SELECT MAX("rank") FROM "medal_table" WHERE "silver"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: Which Bats have a First of josh, and Throws of r, and a Surname of cakebread? <|assistant|> SELECT "bats" FROM "player_roster" WHERE "first"='josh' AND "throws"='r' AND "surname"='cakebread';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: Which DOB has Throws of r, and a Position of c, and a First of torey? <|assistant|> SELECT "d_o_b" FROM "player_roster" WHERE "throws"='r' AND "position"='c' AND "first"='torey';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: Which DOB has a Surname of cresswell? <|assistant|> SELECT "d_o_b" FROM "player_roster" WHERE "surname"='cresswell';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: Which DOB has Bats of r, and Throws of r, and a Position of rhp, and a First of john? <|assistant|> SELECT "d_o_b" FROM "player_roster" WHERE "bats"='r' AND "throws"='r' AND "position"='rhp' AND "first"='john';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: Which Position did Ruzic play? <|assistant|> SELECT "position" FROM "player_roster" WHERE "surname"='ruzic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_roster" ( "surname" text, "first" text, "d_o_b" text, "bats" text, "throws" text, "position" text ); Question: How many throws did Torey have? <|assistant|> SELECT "throws" FROM "player_roster" WHERE "first"='torey';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_starts" ( "name" text, "period" text, "starts" real, "wins" real, "losses" real, "ties" real, "win_pct" real ); Question: Which Ties is the highest one that has Losses smaller than 9, and Starts of 26, and Wins smaller than 21? <|assistant|> SELECT MAX("ties") FROM "most_starts" WHERE "losses"<9 AND "starts"=26 AND "wins"<21;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_starts" ( "name" text, "period" text, "starts" real, "wins" real, "losses" real, "ties" real, "win_pct" real ); Question: Which Win % has a Name of tony rice, and Wins smaller than 28? <|assistant|> SELECT COUNT("win_pct") FROM "most_starts" WHERE "name"='tony rice' AND "wins"<28;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_starts" ( "name" text, "period" text, "starts" real, "wins" real, "losses" real, "ties" real, "win_pct" real ); Question: Which Wins have a Win % smaller than 0.8270000000000001, and a Name of rick mirer, and Ties smaller than 1? <|assistant|> SELECT SUM("wins") FROM "most_starts" WHERE "win_pct"<0.8270000000000001 AND "name"='rick mirer' AND "ties"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_starts" ( "name" text, "period" text, "starts" real, "wins" real, "losses" real, "ties" real, "win_pct" real ); Question: How many Losses have a Name of blair kiel? <|assistant|> SELECT COUNT("losses") FROM "most_starts" WHERE "name"='blair kiel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_starts" ( "name" text, "period" text, "starts" real, "wins" real, "losses" real, "ties" real, "win_pct" real ); Question: Which Losses have a Name of jimmy clausen? <|assistant|> SELECT AVG("losses") FROM "most_starts" WHERE "name"='jimmy clausen';<|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: what is the number of attendance on june 24 <|assistant|> SELECT COUNT("attendance") FROM "game_log" WHERE "date"='june 24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stanley_cup_final" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: Attendance larger than 17,001, and a Date of june 15 had what decision? <|assistant|> SELECT "decision" FROM "stanley_cup_final" WHERE "attendance">'17,001' AND "date"='june 15';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stanley_cup_final" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: Home of dallas happened on what date? <|assistant|> SELECT "date" FROM "stanley_cup_final" WHERE "home"='dallas';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stanley_cup_final" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: Home of buffalo happened on what date? <|assistant|> SELECT "date" FROM "stanley_cup_final" WHERE "home"='buffalo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stanley_cup_final" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: Visitor of dallas, and a Date of june 12 had what highest attendance? <|assistant|> SELECT MAX("attendance") FROM "stanley_cup_final" WHERE "visitor"='dallas' AND "date"='june 12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "men_indoor" ( "pos" real, "mark" text, "athlete" text, "venue" text, "date" text ); Question: On which date was the position less than 4 at Piraeus? <|assistant|> SELECT "date" FROM "men_indoor" WHERE "pos"<4 AND "venue"='piraeus';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: Which team had 64 laps and 13 points? <|assistant|> SELECT "team" FROM "race" WHERE "laps"=64 AND "points"=13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: How many laps did the team with a time/retired of +1.906 have? <|assistant|> SELECT COUNT("laps") FROM "race" WHERE "time_retired"='+1.906';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: What is the time/retired of the team with a grid of 14? <|assistant|> SELECT "time_retired" FROM "race" WHERE "grid"=14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: What is the lowest grid of pkv racing, which had 13 points and less than 64 laps? <|assistant|> SELECT MIN("grid") FROM "race" WHERE "team"='pkv racing' AND "points"=13 AND "laps"<64;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: What is the total grid of the team with a time/retired of +7.346? <|assistant|> SELECT COUNT("grid") FROM "race" WHERE "time_retired"='+7.346';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: What is the grid of pkv racing with the driver oriol servià? <|assistant|> SELECT SUM("grid") FROM "race" WHERE "team"='pkv racing' AND "driver"='oriol servià';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: When Cancelable of yes, bubble of yes and a Category of keyboard, what was the Attribute? <|assistant|> SELECT "attribute" FROM "microsoft_specific_events" WHERE "cancelable"='yes' AND "bubbles"='yes' AND "category"='keyboard';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: When Bubbles of no, and a Category of miscellaneous, and a Type of propertychange, what was the Cancelable? <|assistant|> SELECT "cancelable" FROM "microsoft_specific_events" WHERE "bubbles"='no' AND "category"='miscellaneous' AND "type"='propertychange';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: When Type was rowexit what was the Category? <|assistant|> SELECT "category" FROM "microsoft_specific_events" WHERE "type"='rowexit';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: When Cancelable of yes, and a Type of drag, what was the Category? <|assistant|> SELECT "category" FROM "microsoft_specific_events" WHERE "cancelable"='yes' AND "type"='drag';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: When Event has Bubbles of yes, Cancelable of yes, Category of mouse, and a Type of contextmenu what is the Attribute? <|assistant|> SELECT "attribute" FROM "microsoft_specific_events" WHERE "bubbles"='yes' AND "cancelable"='yes' AND "category"='mouse' AND "type"='contextmenu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "microsoft_specific_events" ( "category" text, "type" text, "attribute" text, "bubbles" text, "cancelable" text ); Question: Let's say Type is of datasetcomplete, what is the Attribute? <|assistant|> SELECT "attribute" FROM "microsoft_specific_events" WHERE "type"='datasetcomplete';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_civil_parishes_and_unparished_ar" ( "name" text, "status" text, "population" real, "district" text, "former_local_authority" text ); Question: What is the name of the parish that has a former local authority of St Neots urban district? <|assistant|> SELECT "name" FROM "list_of_civil_parishes_and_unparished_ar" WHERE "former_local_authority"='st neots urban district';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_civil_parishes_and_unparished_ar" ( "name" text, "status" text, "population" real, "district" text, "former_local_authority" text ); Question: What district is the parish who had the South Cambridgeshire rural district as the former local authority? <|assistant|> SELECT "district" FROM "list_of_civil_parishes_and_unparished_ar" WHERE "former_local_authority"='south cambridgeshire rural district';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_civil_parishes_and_unparished_ar" ( "name" text, "status" text, "population" real, "district" text, "former_local_authority" text ); Question: What district is St Martin's Without parish in with a population less than 75? <|assistant|> SELECT "district" FROM "list_of_civil_parishes_and_unparished_ar" WHERE "population"<75 AND "name"='st martin''s without';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "venue" text, "home" text, "guest" text, "score" text, "attendance" real ); Question: Who was the home team when FK kom were the guests? <|assistant|> SELECT "home" FROM "schedule" WHERE "guest"='fk kom';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "venue" text, "home" text, "guest" text, "score" text, "attendance" real ); Question: What venue was the match against the guest team, FK ibar, played at? <|assistant|> SELECT "venue" FROM "schedule" WHERE "guest"='fk ibar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "year" real, "home" text, "score" text, "away" text, "date" text, "venue" text ); Question: What's the Score with a Home of Scotland and Date of 24 February? <|assistant|> SELECT "score" FROM "results" WHERE "home"='scotland' AND "date"='24 february';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school" text ); Question: What round was john sutro, tackle, drafter with a pick lower than 79? <|assistant|> SELECT SUM("round") FROM "nfl_draft" WHERE "position"='tackle' AND "player"='john sutro' AND "pick"<79;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school" text ); Question: What pick was roger holdinsky? <|assistant|> SELECT "pick" FROM "nfl_draft" WHERE "player"='roger holdinsky';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school" text ); Question: When was chuck morris, back, drafted? <|assistant|> SELECT MIN("pick") FROM "nfl_draft" WHERE "position"='back' AND "player"='chuck morris';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school" text ); Question: What wss the average round drafted for xavier players? <|assistant|> SELECT AVG("round") FROM "nfl_draft" WHERE "school"='xavier';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "rank" text, "urban_sub_area" text, "population" text, "status" text, "council_area" text ); Question: What is the urban sub-area with an East Dunbartonshire council area and a population of 19,020? <|assistant|> SELECT "urban_sub_area" FROM "references" WHERE "council_area"='east dunbartonshire' AND "population"='19,020';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "rank" text, "urban_sub_area" text, "population" text, "status" text, "council_area" text ); Question: What is the council area for the Larkhall urban sub-area? <|assistant|> SELECT "council_area" FROM "references" WHERE "urban_sub_area"='larkhall';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "rank" text, "urban_sub_area" text, "population" text, "status" text, "council_area" text ); Question: What is the population of the East Kilbride urban sub-area? <|assistant|> SELECT "population" FROM "references" WHERE "urban_sub_area"='east kilbride';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "rank" text, "urban_sub_area" text, "population" text, "status" text, "council_area" text ); Question: Which urban sub-area has a population of 16,140? <|assistant|> SELECT "urban_sub_area" FROM "references" WHERE "population"='16,140';<|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: What is the record of the cubs on July 19? <|assistant|> SELECT "record" FROM "game_log" WHERE "date"='july 19';<|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: What was the score during the game that had more than 12,194 people in attendance and a record of 53-32? <|assistant|> SELECT "score" FROM "game_log" WHERE "attendance">'12,194' AND "record"='53-32';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "draft_picks" ( "round" real, "player" text, "position" text, "nationality" text, "college_junior_club_team_league" text ); Question: What nationality is Northwood School (N.Y.)? <|assistant|> SELECT "nationality" FROM "draft_picks" WHERE "college_junior_club_team_league"='northwood school (n.y.)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "california" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); Question: What are incumbent William Vandever's results? <|assistant|> SELECT "result" FROM "california" WHERE "incumbent"='william vandever';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "california" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); Question: Who was the first person elected from Democratic GAIN? <|assistant|> SELECT "first_elected" FROM "california" WHERE "result"='democratic gain';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "california" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); Question: What was the result for incumbent Joseph McKenna who was first elected in 1884? <|assistant|> SELECT "result" FROM "california" WHERE "first_elected"='1884' AND "incumbent"='joseph mckenna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "california" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); Question: When was republican incumbent Joseph McKenna first elected? <|assistant|> SELECT "first_elected" FROM "california" WHERE "party"='republican' AND "incumbent"='joseph mckenna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams_and_venues" ( "team" text, "location" text, "venue" text, "capacity" real, "position_in_1992" text ); Question: what is the lowest capacity in grodno <|assistant|> SELECT MIN("capacity") FROM "teams_and_venues" WHERE "location"='grodno';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Score has January larger than 18 and a Record of 35–15–1? <|assistant|> SELECT "score" FROM "regular_season" WHERE "january">18 AND "record"='35–15–1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500_results" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: How many starts are associated with an oldsmobile engine, 21 finishes and before 2001? <|assistant|> SELECT SUM("start") FROM "indianapolis_500_results" WHERE "engine"='oldsmobile' AND "finish"=21 AND "year"<2001;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500_results" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: What was the finish associated with under 11 starts, a honda engine, before 2003? <|assistant|> SELECT AVG("finish") FROM "indianapolis_500_results" WHERE "start"<11 AND "engine"='honda' AND "year"<2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1960s" ( "year" text, "english_title" text, "original_title" text, "country" text, "director" text ); Question: what is the director of la ronde <|assistant|> SELECT "director" FROM "1960s" WHERE "original_title"='la ronde';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "western_conference_finals" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: What is the lowest number of people attending the game on May 30 with Colorado as the visitors? <|assistant|> SELECT MIN("attendance") FROM "western_conference_finals" WHERE "visitor"='colorado' AND "date"='may 30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "western_conference_finals" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: What is the lowest number of people attending the game where Colorado was the home team? <|assistant|> SELECT MIN("attendance") FROM "western_conference_finals" WHERE "home"='colorado';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "western_conference_finals" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: What was the score of the game on May 26? <|assistant|> SELECT "score" FROM "western_conference_finals" WHERE "date"='may 26';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nhl_entry_draft" ( "round" real, "player" text, "position" text, "nationality" text, "college_junior_club_team" text ); Question: What is the lowest round that Adam Wiesel was picked? <|assistant|> SELECT MIN("round") FROM "nhl_entry_draft" WHERE "player"='adam wiesel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nhl_entry_draft" ( "round" real, "player" text, "position" text, "nationality" text, "college_junior_club_team" text ); Question: What college, junior, or club team did defence player Rory Fitzpatrick play for? <|assistant|> SELECT "college_junior_club_team" FROM "nhl_entry_draft" WHERE "position"='defence' AND "player"='rory fitzpatrick';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "largest_margin_of_innings_victory" ( "score" text, "opposition" text, "venue" text, "city" text, "year" real ); Question: What was the score for 1911? <|assistant|> SELECT "score" FROM "largest_margin_of_innings_victory" WHERE "year"=1911;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: what country has tiger woods <|assistant|> SELECT "country" FROM "third_round" WHERE "player"='tiger woods';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: what country has a score of 69-70-72=211? <|assistant|> SELECT "place" FROM "third_round" WHERE "score"='69-70-72=211';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: what player scored 69-72-68=209? <|assistant|> SELECT "player" FROM "third_round" WHERE "score"='69-72-68=209';<|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 largest number for earnings for tom watson when ranked more than 2? <|assistant|> SELECT MAX("earnings") FROM "leaders" WHERE "player"='tom watson' AND "rank">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "willingen" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which 1st (m) is the lowest one that has a Nationality of aut, and Points larger than 273.5? <|assistant|> SELECT MIN("1st_m") FROM "willingen" WHERE "nationality"='aut' AND "points">273.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "willingen" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which 2nd (m) is the lowest one that has a Rank larger than 3, and a 1st (m) larger than 140.5? <|assistant|> SELECT MIN("2nd_m") FROM "willingen" WHERE "rank">3 AND "1st_m">140.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "willingen" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which 2nd (m) has an Overall WC points (Rank) of 1632 (1), and Points larger than 273.5? <|assistant|> SELECT SUM("2nd_m") FROM "willingen" WHERE "overall_wc_points_rank"='1632 (1)' AND "points">273.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "points" text, "position" text ); Question: What is the highest number of wins associated with under 0 poles? <|assistant|> SELECT MAX("wins") FROM "career_summary" WHERE "poles"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "points" text, "position" text ); Question: How many poles did he have in 2006 with under 2 wins? <|assistant|> SELECT "poles" FROM "career_summary" WHERE "season"='2006' AND "wins"<2;<|endoftext|>