text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: Which Result has a First elected of 1876, and a District of south carolina 3? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1876 AND "district"='south carolina 3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: Which Result has a First elected larger than 1876, and an Incumbent of john s. richardson? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected">1876 AND "incumbent"='john s. richardson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ohio" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: Who is the incumbent that is a republican and first elected before 1864? <|assistant|> SELECT "incumbent" FROM "ohio" WHERE "party"='republican' AND "first_elected"<1864;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ohio" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: What district is the democratic Francis C. Le Blond from? <|assistant|> SELECT "district" FROM "ohio" WHERE "party"='democratic' AND "incumbent"='francis c. le blond';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ohio" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: In the Ohio 4 district, that is the first elected date that has a result of re-elected? <|assistant|> SELECT SUM("first_elected") FROM "ohio" WHERE "result"='re-elected' AND "district"='ohio 4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ohio" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text ); Question: What is the party in Ohio 6 District? <|assistant|> SELECT "party" FROM "ohio" WHERE "district"='ohio 6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "dates" text, "champion" text, "country" text, "score" text, "to_par" text, "margin_of_victory" text ); Question: Which To par has a Year of 1994? <|assistant|> SELECT "to_par" FROM "winners" WHERE "year"=1994;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "dates" text, "champion" text, "country" text, "score" text, "to_par" text, "margin_of_victory" text ); Question: Which Country has a Margin of victory of 2 strokes? <|assistant|> SELECT "country" FROM "winners" WHERE "margin_of_victory"='2 strokes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "dates" text, "champion" text, "country" text, "score" text, "to_par" text, "margin_of_victory" text ); Question: Which Year is the lowest one that has a To par of –1? <|assistant|> SELECT MIN("year") FROM "winners" WHERE "to_par"='–1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "dates" text, "champion" text, "country" text, "score" text, "to_par" text, "margin_of_victory" text ); Question: Which Margin of victory has a Year larger than 1994, and a To par of –14, and a Score of 69-67-69-69=274? <|assistant|> SELECT "margin_of_victory" FROM "winners" WHERE "year">1994 AND "to_par"='–14' AND "score"='69-67-69-69=274';<|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, "location" text, "time_et" text, "result" text, "record" text ); Question: What was the record after the game at the Astrodome? <|assistant|> SELECT "record" FROM "schedule" WHERE "location"='astrodome';<|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, "location" text, "time_et" text, "result" text, "record" text ); Question: What was the record after the game against the Houston Oilers? <|assistant|> SELECT "record" FROM "schedule" WHERE "opponent"='houston oilers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_3_balls_2_ropes" ( "nation" text, "t_score" real, "a_score" real, "e_score" real, "total" real ); Question: What is the average total score of Belarus, which had an E score less than 8.2? <|assistant|> SELECT AVG("total") FROM "group_3_balls_2_ropes" WHERE "nation"='belarus' AND "e_score"<8.2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_3_balls_2_ropes" ( "nation" text, "t_score" real, "a_score" real, "e_score" real, "total" real ); Question: What is the total of the team with a T score greater than 8 and an E score less than 8.4? <|assistant|> SELECT SUM("total") FROM "group_3_balls_2_ropes" WHERE "t_score">8 AND "e_score"<8.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_3_balls_2_ropes" ( "nation" text, "t_score" real, "a_score" real, "e_score" real, "total" real ); Question: What is the T score of the team with an E score of 6.625? <|assistant|> SELECT "t_score" FROM "group_3_balls_2_ropes" WHERE "e_score"=6.625;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_3_balls_2_ropes" ( "nation" text, "t_score" real, "a_score" real, "e_score" real, "total" real ); Question: What is the total of Poland, which has an E score greater than 7.725? <|assistant|> SELECT COUNT("total") FROM "group_3_balls_2_ropes" WHERE "nation"='poland' AND "e_score">7.725;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "group_3_balls_2_ropes" ( "nation" text, "t_score" real, "a_score" real, "e_score" real, "total" real ); Question: What is the total of the team with a T score less than 6.8? <|assistant|> SELECT SUM("total") FROM "group_3_balls_2_ropes" WHERE "t_score"<6.8;<|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: What date has a competition of 2012 afc challenge cup, and dasarath rangasala stadium, kathmandu as the venue? <|assistant|> SELECT "date" FROM "international_goals" WHERE "competition"='2012 afc challenge cup' AND "venue"='dasarath rangasala stadium, kathmandu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "opinion_polls" ( "polling_firm" text, "date" text, "venstre_v" text, "social_democrats_a" text, "danish_people_s_party_o" text, "socialist_people_s_party_f" text, "conservative_people_s_party_c" text, "social_liberal_party_b" text, "liberal_alliance_i" text, "red_green_alliance" text, "christian_democrats_k" text, "government" text, "opposition" text ); Question: Which Social Liberal Party has 4.5% of the Conservative People's Party? <|assistant|> SELECT "social_liberal_party_b" FROM "opinion_polls" WHERE "conservative_people_s_party_c"='4.5%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "opinion_polls" ( "polling_firm" text, "date" text, "venstre_v" text, "social_democrats_a" text, "danish_people_s_party_o" text, "socialist_people_s_party_f" text, "conservative_people_s_party_c" text, "social_liberal_party_b" text, "liberal_alliance_i" text, "red_green_alliance" text, "christian_democrats_k" text, "government" text, "opposition" text ); Question: What opposition do 31.1% of Social Democrats have? <|assistant|> SELECT "opposition" FROM "opinion_polls" WHERE "social_democrats_a"='31.1%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "opinion_polls" ( "polling_firm" text, "date" text, "venstre_v" text, "social_democrats_a" text, "danish_people_s_party_o" text, "socialist_people_s_party_f" text, "conservative_people_s_party_c" text, "social_liberal_party_b" text, "liberal_alliance_i" text, "red_green_alliance" text, "christian_democrats_k" text, "government" text, "opposition" text ); Question: What is the Liberal Alliance that is backed by the Polling Firm, Capacent, and 13.0% of the Socialist People's Party? <|assistant|> SELECT "liberal_alliance_i" FROM "opinion_polls" WHERE "polling_firm"='capacent' AND "socialist_people_s_party_f"='13.0%';<|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_club_team" text ); Question: Which Position has a Round larger than 14, and a School/Club Team of north texas? <|assistant|> SELECT "position" FROM "nfl_draft" WHERE "round">14 AND "school_club_team"='north texas';<|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_club_team" text ); Question: Which Round has a Player of anthony christnovich? <|assistant|> SELECT "round" FROM "nfl_draft" WHERE "player"='anthony christnovich';<|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_club_team" text ); Question: Which Round is the lowest one that has a School/Club Team of virginia? <|assistant|> SELECT MIN("round") FROM "nfl_draft" WHERE "school_club_team"='virginia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What is the name of the leading scorer on 2006-11-22? <|assistant|> SELECT "leading_scorer" FROM "november" WHERE "date"='2006-11-22';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What is the name of the leading scorer when the record was 9–6? <|assistant|> SELECT "leading_scorer" FROM "november" WHERE "record"='9–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What is the number of people in Attendance when Visitor was the warriors on 2006-11-04? <|assistant|> SELECT "attendance" FROM "november" WHERE "visitor"='warriors' AND "date"='2006-11-04';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What team was the visitor when there were more than 16,182 people in attendance and the record was 6–3? <|assistant|> SELECT "visitor" FROM "november" WHERE "attendance">'16,182' AND "record"='6–3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What is the name of the visitor on 2006-11-04? <|assistant|> SELECT "visitor" FROM "november" WHERE "date"='2006-11-04';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What is the name of the Leading scorer when the Score was 89–102? <|assistant|> SELECT "leading_scorer" FROM "november" WHERE "score"='89–102';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_by_population" ( "rank" real, "town" text, "population" real, "year" real, "borough" text, "definition" text ); Question: Which Year is the highest one that has a Population larger than 13,012, and a Borough of richmondshire? <|assistant|> SELECT MAX("year") FROM "settlements_by_population" WHERE "population">'13,012' AND "borough"='richmondshire';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_by_population" ( "rank" real, "town" text, "population" real, "year" real, "borough" text, "definition" text ); Question: How many people live in Norton? <|assistant|> SELECT SUM("population") FROM "settlements_by_population" WHERE "town"='norton';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_by_population" ( "rank" real, "town" text, "population" real, "year" real, "borough" text, "definition" text ); Question: Which Year has a Borough of harrogate, and a Rank smaller than 6, and a Definition of civil parish? <|assistant|> SELECT "year" FROM "settlements_by_population" WHERE "borough"='harrogate' AND "rank"<6 AND "definition"='civil parish';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_by_population" ( "rank" real, "town" text, "population" real, "year" real, "borough" text, "definition" text ); Question: Which Definition has a Rank smaller than 12, and a Town of tadcaster? <|assistant|> SELECT "definition" FROM "settlements_by_population" WHERE "rank"<12 AND "town"='tadcaster';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_by_population" ( "rank" real, "town" text, "population" real, "year" real, "borough" text, "definition" text ); Question: Which Rank is the lowest one that has a Borough of richmondshire, and a Population larger than 8,178? <|assistant|> SELECT MIN("rank") FROM "settlements_by_population" WHERE "borough"='richmondshire' AND "population">'8,178';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many bronze medals did Bulgaria receive? <|assistant|> SELECT "bronze" FROM "medal_table" WHERE "nation"='bulgaria';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fourth_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What was Phil Mickelson's score to par? <|assistant|> SELECT "to_par" FROM "fourth_round" WHERE "player"='phil mickelson';<|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 name has an overall less than 268, and 1 as the round? <|assistant|> SELECT "name" FROM "atlanta_falcons_draft_history" WHERE "overall"<268 AND "round"=1;<|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: How many pick #'s have james britt as the name, with a round greater than 2? <|assistant|> SELECT COUNT("pick_num") FROM "atlanta_falcons_draft_history" WHERE "name"='james britt' AND "round">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); Question: what is the score on november 15 <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='november 15';<|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, "events" real, "wins" real ); Question: Which Wins is the highest one that has a Country of united states, and a Player of andy bean, and a Rank smaller than 4? <|assistant|> SELECT MAX("wins") FROM "leaders" WHERE "country"='united states' AND "player"='andy bean' AND "rank"<4;<|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, "events" real, "wins" real ); Question: Which Country has a Rank of 5? <|assistant|> SELECT "country" FROM "leaders" WHERE "rank"=5;<|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, "events" real, "wins" real ); Question: Which Earnings ($) is the lowest one that has a Rank smaller than 1? <|assistant|> SELECT MIN("earnings") FROM "leaders" WHERE "rank"<1;<|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, "save" text ); Question: What is the score of the game on September 13 when the Expos were the opponent? <|assistant|> SELECT "score" FROM "game_log" WHERE "opponent"='expos' AND "date"='september 13';<|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, "save" text ); Question: Who was the opponent on the September 3 game? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='september 3';<|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, "save" text ); Question: What is the save of the game on September 15? <|assistant|> SELECT "save" FROM "game_log" WHERE "date"='september 15';<|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: Which Game site has a Week larger than 14? <|assistant|> SELECT "game_site" FROM "schedule" WHERE "week">14;<|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: Which Date has a Game site of jeppesen stadium? <|assistant|> SELECT "date" FROM "schedule" WHERE "game_site"='jeppesen stadium';<|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: Which Game site has 27,189 Attendances ? <|assistant|> SELECT "game_site" FROM "schedule" WHERE "attendance"='27,189';<|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: When is it has 15,557 Attendances? <|assistant|> SELECT "date" FROM "schedule" WHERE "attendance"='15,557';<|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: With an Overall less than 171, what is the Round pick of Lance Moon? <|assistant|> SELECT MIN("round") FROM "atlanta_falcons_draft_history" WHERE "name"='lance moon' AND "overall"<171;<|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 Name of draft Pick #10? <|assistant|> SELECT "name" FROM "atlanta_falcons_draft_history" WHERE "pick_num"=10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: How many Rounds have a Defensive End Pick? <|assistant|> SELECT COUNT("round") FROM "jacksonville_jaguars_draft_history" WHERE "position"='defensive end';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What was the time when Shinya Aoki was the opponent? <|assistant|> SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='shinya aoki';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: Which method was used in round 1 with a record of 1-0? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"=1 AND "record"='1-0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_motorcycle_racing_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); Question: Which rank has a team of Suzuki with under 16 points? <|assistant|> SELECT "rank" FROM "grand_prix_motorcycle_racing_results" WHERE "team"='suzuki' AND "points"<16;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_motorcycle_racing_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); Question: Which class has a rank of 5th? <|assistant|> SELECT "class" FROM "grand_prix_motorcycle_racing_results" WHERE "rank"='5th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_motorcycle_racing_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); Question: Which team has a class of 500cc and rank of 16th? <|assistant|> SELECT "team" FROM "grand_prix_motorcycle_racing_results" WHERE "class"='500cc' AND "rank"='16th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grand_prix_motorcycle_racing_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); Question: Which team has 16 points and ranks 14th? <|assistant|> SELECT "team" FROM "grand_prix_motorcycle_racing_results" WHERE "points"=16 AND "rank"='14th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_and_lowest_scoring_performances" ( "dance" text, "best_dancer_s" text, "best_score" text, "worst_dancer_s" text, "worst_score" text ); Question: What is the dance that has priscilla presley is the worst dancer(s), and the worst score of 21? <|assistant|> SELECT "dance" FROM "highest_and_lowest_scoring_performances" WHERE "worst_dancer_s"='priscilla presley' AND "worst_score"='21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_and_lowest_scoring_performances" ( "dance" text, "best_dancer_s" text, "best_score" text, "worst_dancer_s" text, "worst_score" text ); Question: What is the best score of the dance freestyle? <|assistant|> SELECT "best_score" FROM "highest_and_lowest_scoring_performances" WHERE "dance"='freestyle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "highest_and_lowest_scoring_performances" ( "dance" text, "best_dancer_s" text, "best_score" text, "worst_dancer_s" text, "worst_score" text ); Question: Which dance has the worst dancer(s) as marissa jaret winokur? <|assistant|> SELECT "dance" FROM "highest_and_lowest_scoring_performances" WHERE "worst_dancer_s"='marissa jaret winokur';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Points have an Opponent of vancouver canucks? <|assistant|> SELECT AVG("points") FROM "regular_season" WHERE "opponent"='vancouver canucks';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); Question: How many Points have a Score of 3–0? <|assistant|> SELECT COUNT("points") FROM "regular_season" WHERE "score"='3–0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Game has Points smaller than 10, and an October larger than 12, and an Opponent of @ washington capitals? <|assistant|> SELECT SUM("game") FROM "regular_season" WHERE "points"<10 AND "october">12 AND "opponent"='@ washington capitals';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Record has Points larger than 0, and a Score of 7–3? <|assistant|> SELECT "record" FROM "regular_season" WHERE "points">0 AND "score"='7–3';<|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: On what date was the game more than 5? <|assistant|> SELECT "date" FROM "game_log" WHERE "game">5;<|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: Which series was on May 16? <|assistant|> SELECT "series" FROM "game_log" WHERE "date"='may 16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statewide" ( "date" text, "jurisdiction" text, "ronald_reagan" text, "george_h_w_bush" text, "john_b_anderson" text, "howard_baker" text, "john_connally" text, "phil_crane" text, "bob_dole" text ); Question: Name the date for oregon jurisdiction <|assistant|> SELECT "date" FROM "statewide" WHERE "jurisdiction"='oregon';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statewide" ( "date" text, "jurisdiction" text, "ronald_reagan" text, "george_h_w_bush" text, "john_b_anderson" text, "howard_baker" text, "john_connally" text, "phil_crane" text, "bob_dole" text ); Question: Name the john b. anderson for ronald reagan of 43% and phil crane of 0% <|assistant|> SELECT "john_b_anderson" FROM "statewide" WHERE "phil_crane"='0%' AND "ronald_reagan"='43%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statewide" ( "date" text, "jurisdiction" text, "ronald_reagan" text, "george_h_w_bush" text, "john_b_anderson" text, "howard_baker" text, "john_connally" text, "phil_crane" text, "bob_dole" text ); Question: Name the howard bake when bush had 66% <|assistant|> SELECT "howard_baker" FROM "statewide" WHERE "george_h_w_bush"='66%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statewide" ( "date" text, "jurisdiction" text, "ronald_reagan" text, "george_h_w_bush" text, "john_b_anderson" text, "howard_baker" text, "john_connally" text, "phil_crane" text, "bob_dole" text ); Question: Name the george bush for ronald reagan of 43% <|assistant|> SELECT "george_h_w_bush" FROM "statewide" WHERE "ronald_reagan"='43%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statewide" ( "date" text, "jurisdiction" text, "ronald_reagan" text, "george_h_w_bush" text, "john_b_anderson" text, "howard_baker" text, "john_connally" text, "phil_crane" text, "bob_dole" text ); Question: Name the howard baker for ronald reagan of 72% <|assistant|> SELECT "howard_baker" FROM "statewide" WHERE "ronald_reagan"='72%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "season" text, "club" text, "country" text, "competition" text, "caps" real, "goals" real ); Question: What is the sum of goals for the 2004/05 Season? <|assistant|> SELECT SUM("goals") FROM "references" WHERE "season"='2004/05';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "season" text, "club" text, "country" text, "competition" text, "caps" real, "goals" real ); Question: What is the lowest caps for the Club of SBV Excelsior? <|assistant|> SELECT MIN("caps") FROM "references" WHERE "club"='sbv excelsior';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "season" text, "club" text, "country" text, "competition" text, "caps" real, "goals" real ); Question: Which season has Caps lower than 36 for the Club of NAC Breda? <|assistant|> SELECT "season" FROM "references" WHERE "caps"<36 AND "club"='nac breda';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_4_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); Question: Which Opponents in the final have a Partner of daniella dominikovic? <|assistant|> SELECT "opponents_in_the_final" FROM "doubles_11_4_7" WHERE "partner"='daniella dominikovic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_4_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); Question: Which Date has a Partner of daniella dominikovic? <|assistant|> SELECT "date" FROM "doubles_11_4_7" WHERE "partner"='daniella dominikovic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_4_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); Question: Which Surface has a Partner of pemra ΓΆzgen? <|assistant|> SELECT "surface" FROM "doubles_11_4_7" WHERE "partner"='pemra ΓΆzgen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_4_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); Question: Which Date has Opponents in the final of valeria casillo lilly raffa? <|assistant|> SELECT "date" FROM "doubles_11_4_7" WHERE "opponents_in_the_final"='valeria casillo lilly raffa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_4_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); Question: Which Date has a Partner of daniella dominikovic? <|assistant|> SELECT "date" FROM "doubles_11_4_7" WHERE "partner"='daniella dominikovic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Nationality of england, and a Matches smaller than 510, and a Lost of 4, and a Win % smaller than 28.6 had what lowest drawn? <|assistant|> SELECT MIN("drawn") FROM "managers" WHERE "nationality"='england' AND "matches"<510 AND "lost"=4 AND "win_pct"<28.6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Win % larger than 47.1, and a Matches smaller than 145 had what lowest lost? <|assistant|> SELECT MIN("lost") FROM "managers" WHERE "win_pct">47.1 AND "matches"<145;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Matches of 15, and a Win % smaller than 20 had what highest lost? <|assistant|> SELECT MAX("lost") FROM "managers" WHERE "matches"=15 AND "win_pct"<20;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Nationality of england, and a Lost larger than 39, and a Win % of 28.7, and a Drawn smaller than 37 had what sum of matches? <|assistant|> SELECT SUM("matches") FROM "managers" WHERE "nationality"='england' AND "lost">39 AND "win_pct"=28.7 AND "drawn"<37;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Drawn smaller than 24, and a Lost smaller than 17, and a Win % smaller than 31.25 had how many total number of matches? <|assistant|> SELECT COUNT("matches") FROM "managers" WHERE "drawn"<24 AND "lost"<17 AND "win_pct"<31.25;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managers" ( "nationality" text, "matches" real, "drawn" real, "lost" real, "win_pct" real ); Question: Lost of 18 had what sum of win %? <|assistant|> SELECT SUM("win_pct") FROM "managers" WHERE "lost"=18;<|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, "record" text ); Question: When was the score 5-31? <|assistant|> SELECT "date" FROM "game_log" WHERE "record"='5-31';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixteenth_finals" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What is the second leg that has kk bosna? <|assistant|> SELECT "2nd_leg" FROM "sixteenth_finals" WHERE "team_num1"='kk bosna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixteenth_finals" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: What is the 1st leg that has hapoel jerusalem? <|assistant|> SELECT "1st_leg" FROM "sixteenth_finals" WHERE "team_num1"='hapoel jerusalem';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixteenth_finals" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: Which 1st leg that has hemofarm? <|assistant|> SELECT "1st_leg" FROM "sixteenth_finals" WHERE "team_num1"='hemofarm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sixteenth_finals" ( "team_num1" text, "agg" text, "team_num2" text, "1st_leg" text, "2nd_leg" text ); Question: WHich Team#1 has 70 - 59 as a 1st leg? <|assistant|> SELECT "team_num1" FROM "sixteenth_finals" WHERE "1st_leg"='70 - 59';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: Who averaged 201.3 yards passing per game? <|assistant|> SELECT "name" FROM "passing" WHERE "avg_g"=201.3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: How many players had an Att-Cmp-Int of 143–269–16, and an efficiency of less than 116.9? <|assistant|> SELECT COUNT("avg_g") FROM "passing" WHERE "att_cmp_int"='143–269–16' AND "effic"<116.9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: What is the Att-Cmp-Int for the player with a efficiency of 117.4? <|assistant|> SELECT "att_cmp_int" FROM "passing" WHERE "effic"=117.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statistics" ( "player" text, "played" real, "legs_won" real, "legs_lost" real, "100" real, "140" real, "180s" real, "high_checkout" real, "3_dart_average" real ); Question: How many legs were won by the player who had less than 84 100+, less than 14 legs lost, and less than 3 played? <|assistant|> SELECT SUM("legs_won") FROM "statistics" WHERE "100"<84 AND "legs_lost"<14 AND "played"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statistics" ( "player" text, "played" real, "legs_won" real, "legs_lost" real, "100" real, "140" real, "180s" real, "high_checkout" real, "3_dart_average" real ); Question: What is the total number of legs lost of the player with a high checkout less than 76 and less than 3 played? <|assistant|> SELECT COUNT("legs_lost") FROM "statistics" WHERE "high_checkout"<76 AND "played"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statistics" ( "player" text, "played" real, "legs_won" real, "legs_lost" real, "100" real, "140" real, "180s" real, "high_checkout" real, "3_dart_average" real ); Question: What is the number played of the player with 7 180s and a 140+ greater than 28? <|assistant|> SELECT "played" FROM "statistics" WHERE "180s"=7 AND "140">28;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statistics" ( "player" text, "played" real, "legs_won" real, "legs_lost" real, "100" real, "140" real, "180s" real, "high_checkout" real, "3_dart_average" real ); Question: What is the number of legs lost of the player with more than 8 legs won, 4 played, less than 6 180s, and a 100+ greater than 46? <|assistant|> SELECT SUM("legs_lost") FROM "statistics" WHERE "legs_won">8 AND "played"=4 AND "180s"<6 AND "100">46;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "statistics" ( "player" text, "played" real, "legs_won" real, "legs_lost" real, "100" real, "140" real, "180s" real, "high_checkout" real, "3_dart_average" real ); Question: What is the average number of legs won of the player with a high checkout greater than 96, more than 5 played, and a smaller than 95.61 3-dart average? <|assistant|> SELECT AVG("legs_won") FROM "statistics" WHERE "high_checkout">96 AND "played">5 AND "3_dart_average"<95.61;<|endoftext|>