text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many goals have more than 38 played and more than 9 draws? <|assistant|> SELECT SUM("goals_for") FROM "final_table" WHERE "draws">9 AND "played">38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many losses has more than 59 goals against and more than 17 position? <|assistant|> SELECT MIN("losses") FROM "final_table" WHERE "goals_against">59 AND "position">17;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: On what Date was the Meet of 2007 Pan American Games with a Time of 1:07.78? <|assistant|> SELECT "date" FROM "women" WHERE "meet"='2007 pan american games' AND "time"='1:07.78';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: What Nationality's time is 2:07.64? <|assistant|> SELECT "nationality" FROM "women" WHERE "time"='2:07.64';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: What Event's Time is 4:01.00? <|assistant|> SELECT "event" FROM "women" WHERE "time"='4:01.00';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: In what Location in the United States the Time 2:25.62? <|assistant|> SELECT "location" FROM "women" WHERE "nationality"='united states' AND "time"='2:25.62';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "outdoor" ( "year" real, "record" text, "regular_season_finish" text, "playoffs" text, "avg_attendance" real ); Question: Year larger than 1975, and a Record of 13–11 is what playoffs? <|assistant|> SELECT "playoffs" FROM "outdoor" WHERE "year">1975 AND "record"='13–11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: Which 9:30 has a 10:30 of le journal weekend? <|assistant|> SELECT "9_30" FROM "sunday" WHERE "10_30"='le journal weekend';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: Which 9:00 has an 8:00 behind the movies? <|assistant|> SELECT "9_00" FROM "sunday" WHERE "8_00"='behind the movies';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What 10:00 has a 7:30 of da kink in my hair? <|assistant|> SELECT "10_00" FROM "sunday" WHERE "7_30"='da kink in my hair';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What 7:00 has a 9:30 of tout le monde en parle? <|assistant|> SELECT "7_00" FROM "sunday" WHERE "9_30"='tout le monde en parle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What 7:00 has a 10:00 of dirty sexy money? <|assistant|> SELECT "7_00" FROM "sunday" WHERE "10_00"='dirty sexy money';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sunday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What 10:00 has a 8:00 of movies? <|assistant|> SELECT "10_00" FROM "sunday" WHERE "8_00"='movies';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "major_titles" ( "competition" text, "venue" text, "year" real, "category" text, "result" text ); Question: What are the venues prior to 2005 in the World Class category that resulted in a bronze? <|assistant|> SELECT "venue" FROM "major_titles" WHERE "year"<2005 AND "category"='world class' AND "result"='bronze';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "major_titles" ( "competition" text, "venue" text, "year" real, "category" text, "result" text ); Question: What are the competitions that occurred before 2006 in SVK Nitra? <|assistant|> SELECT "competition" FROM "major_titles" WHERE "year"<2006 AND "venue"='svk nitra';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "major_titles" ( "competition" text, "venue" text, "year" real, "category" text, "result" text ); Question: What are the categories of events that occurred after 2007 that were World Championships? <|assistant|> SELECT "category" FROM "major_titles" WHERE "year">2007 AND "competition"='world championships';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "major_titles" ( "competition" text, "venue" text, "year" real, "category" text, "result" text ); Question: What was the result of events held at Nor Elverum, prior to 2010? <|assistant|> SELECT "result" FROM "major_titles" WHERE "year"<2010 AND "venue"='nor elverum';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "major_titles" ( "competition" text, "venue" text, "year" real, "category" text, "result" text ); Question: What was the competition held in 2003? <|assistant|> SELECT "competition" FROM "major_titles" WHERE "year"=2003;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What chassis type does a scuderia ferrari with more than 1 point have? <|assistant|> SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "entrant"='scuderia ferrari' AND "points">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: A ferrari flat-12 engine with more than 1 point has what kind of chassis? <|assistant|> SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "engine"='ferrari flat-12' AND "points">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the average year for a merzario a2 chassis? <|assistant|> SELECT AVG("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='merzario a2';<|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, "record" text ); Question: What was the team's record when they played visitor team Chicago Black Hawks on November 24? <|assistant|> SELECT "record" FROM "regular_season" WHERE "visitor"='chicago black hawks' AND "date"='november 24';<|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, "record" text ); Question: What is the name of the visitor team who played home team Chicago Black Hawks on March 20? <|assistant|> SELECT "visitor" FROM "regular_season" WHERE "home"='chicago black hawks' AND "date"='march 20';<|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, "record" text ); Question: What was the team's record on November 12? <|assistant|> SELECT "record" FROM "regular_season" WHERE "date"='november 12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners_and_runners_up" ( "year" text, "date_final" text, "venue" text, "prize_money" text, "champion" text, "runner_up" text, "score_in_final" text, "commercial_name" text ); Question: What champion has 1981 as the year? <|assistant|> SELECT "champion" FROM "past_winners_and_runners_up" WHERE "year"='1981';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners_and_runners_up" ( "year" text, "date_final" text, "venue" text, "prize_money" text, "champion" text, "runner_up" text, "score_in_final" text, "commercial_name" text ); Question: What date final has 1982 as the year? <|assistant|> SELECT "date_final" FROM "past_winners_and_runners_up" WHERE "year"='1982';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners_and_runners_up" ( "year" text, "date_final" text, "venue" text, "prize_money" text, "champion" text, "runner_up" text, "score_in_final" text, "commercial_name" text ); Question: What prize money has michelob light challenge of champions as the commercial name? <|assistant|> SELECT "prize_money" FROM "past_winners_and_runners_up" WHERE "commercial_name"='michelob light challenge of champions';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners_and_runners_up" ( "year" text, "date_final" text, "venue" text, "prize_money" text, "champion" text, "runner_up" text, "score_in_final" text, "commercial_name" text ); Question: What date final has 1989 as the year? <|assistant|> SELECT "date_final" FROM "past_winners_and_runners_up" WHERE "year"='1989';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners_and_runners_up" ( "year" text, "date_final" text, "venue" text, "prize_money" text, "champion" text, "runner_up" text, "score_in_final" text, "commercial_name" text ); Question: What score in final has boris becker as the champion? <|assistant|> SELECT "score_in_final" FROM "past_winners_and_runners_up" WHERE "champion"='boris becker';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the greatest point of an Entrant of connaught engineering alta straight-4 engine before 1957 <|assistant|> SELECT MAX("points") FROM "complete_world_championship_formula_one_" WHERE "engine"='alta straight-4' AND "entrant"='connaught engineering' AND "year"<1957;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_world_championship_formula_one_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What 1957 engine has a Chassis of connaught type b? <|assistant|> SELECT "engine" FROM "complete_world_championship_formula_one_" WHERE "chassis"='connaught type b' AND "year">1957;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Name the least year for david eddy <|assistant|> SELECT MIN("year") FROM "winners" WHERE "men_s_singles"='david eddy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Name the mixed doubles for year before 1991 and men's doubles of david jepson buck ryan <|assistant|> SELECT "mixed_doubles" FROM "winners" WHERE "year"<1991 AND "men_s_doubles"='david jepson buck ryan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Name the women's doubles for year less than 1972 <|assistant|> SELECT "women_s_doubles" FROM "winners" WHERE "year"<1972;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "champions_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: When was the winning score −9 (72-68-64-67=271)? <|assistant|> SELECT "date" FROM "champions_tour_wins_9" WHERE "winning_score"='−9 (72-68-64-67=271)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "champions_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What was the margin of victory for the Mississippi Gulf Resort Classic? <|assistant|> SELECT "margin_of_victory" FROM "champions_tour_wins_9" WHERE "tournament"='mississippi gulf resort classic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "champions_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What was the margin of victory when Mark Calcavecchia was the runner-up? <|assistant|> SELECT "margin_of_victory" FROM "champions_tour_wins_9" WHERE "runner_s_up"='mark calcavecchia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "champions_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What was the date of the Ace Group Classic tournament with a 1 stroke margin of victory? <|assistant|> SELECT "date" FROM "champions_tour_wins_9" WHERE "margin_of_victory"='1 stroke' AND "tournament"='the ace group classic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "champions_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What was the margin of victory when the winning score was −9 (72-68-64-67=271)? <|assistant|> SELECT "margin_of_victory" FROM "champions_tour_wins_9" WHERE "winning_score"='−9 (72-68-64-67=271)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1981_raiders_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); Question: What is the average round for te position? <|assistant|> SELECT AVG("round") FROM "1981_raiders_draft_selections" WHERE "position"='te';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1981_raiders_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); Question: Name the average overall for james davis <|assistant|> SELECT AVG("overall") FROM "1981_raiders_draft_selections" WHERE "player"='james davis';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1981_raiders_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); Question: Name the most overall for james davis and round more than 5 <|assistant|> SELECT MAX("overall") FROM "1981_raiders_draft_selections" WHERE "player"='james davis' AND "round">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1981_raiders_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); Question: Name the total number of overall for villanova and round less than 2 <|assistant|> SELECT COUNT("overall") FROM "1981_raiders_draft_selections" WHERE "college"='villanova' AND "round"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_50_most_topographically_prominent_su" ( "rank" real, "mountain_peak" text, "state" text, "mountain_range" text, "location" text ); Question: Which state is Mount Chiginagak located in? <|assistant|> SELECT "state" FROM "the_50_most_topographically_prominent_su" WHERE "mountain_peak"='mount chiginagak';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "date" text, "location" text, "nature_of_incident" text, "circumstances" text, "casualties" text ); Question: What were the circumstances for the Baghlan location? <|assistant|> SELECT "circumstances" FROM "2008" WHERE "location"='baghlan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "date" text, "location" text, "nature_of_incident" text, "circumstances" text, "casualties" text ); Question: What were the casualties in the Baghlan location? <|assistant|> SELECT "casualties" FROM "2008" WHERE "location"='baghlan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "date" text, "location" text, "nature_of_incident" text, "circumstances" text, "casualties" text ); Question: What was the date of natural cause situation? <|assistant|> SELECT "date" FROM "2008" WHERE "circumstances"='natural cause';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Gold Coast has a Perth of no, a Sydney of yes, and an Auckland of yes? <|assistant|> SELECT "gold_coast" FROM "2008" WHERE "perth"='no' AND "sydney"='yes' AND "auckland"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Melbourne has an Auckland of no, and a Gold Coast of no? <|assistant|> SELECT "melbourne" FROM "2008" WHERE "auckland"='no' AND "gold_coast"='no';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Adelaide has a Melbourne of yes, an Auckland of yes, and a Perth of yes? <|assistant|> SELECT "adelaide" FROM "2008" WHERE "melbourne"='yes' AND "auckland"='yes' AND "perth"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Sydney has a Perth of no, a Melbourne of yes, and a Gold Coast of no? <|assistant|> SELECT "sydney" FROM "2008" WHERE "perth"='no' AND "melbourne"='yes' AND "gold_coast"='no';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Auckland has an Adelaide of no, a Melbourne of yes, and a Sydney of yes? <|assistant|> SELECT "auckland" FROM "2008" WHERE "adelaide"='no' AND "melbourne"='yes' AND "sydney"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Adelaide has an Auckland of yes, a Melbourne of yes, a Perth of yes, and a Sydney of cancelled? <|assistant|> SELECT "adelaide" FROM "2008" WHERE "auckland"='yes' AND "melbourne"='yes' AND "perth"='yes' AND "sydney"='cancelled';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "full_time_teams" ( "team" text, "truck_s" text, "driver_s" text, "primary_sponsor_s" text, "owner_s" text, "crew_chief" text ); Question: Who is the owner of RSS Racing that driver Ryan Sieg belongs to? <|assistant|> SELECT "owner_s" FROM "full_time_teams" WHERE "team"='rss racing' AND "driver_s"='ryan sieg';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "full_time_teams" ( "team" text, "truck_s" text, "driver_s" text, "primary_sponsor_s" text, "owner_s" text, "crew_chief" text ); Question: Parts Plus sponsors what driver? <|assistant|> SELECT "driver_s" FROM "full_time_teams" WHERE "primary_sponsor_s"='parts plus';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "full_time_teams" ( "team" text, "truck_s" text, "driver_s" text, "primary_sponsor_s" text, "owner_s" text, "crew_chief" text ); Question: Who is the owner of NTS Motorsports sponsored by Qore-24? <|assistant|> SELECT "owner_s" FROM "full_time_teams" WHERE "team"='nts motorsports' AND "primary_sponsor_s"='qore-24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "full_time_teams" ( "team" text, "truck_s" text, "driver_s" text, "primary_sponsor_s" text, "owner_s" text, "crew_chief" text ); Question: Who is the crew chief, of driver Matt kurzejewski? <|assistant|> SELECT "crew_chief" FROM "full_time_teams" WHERE "driver_s"='matt kurzejewski';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "full_time_teams" ( "team" text, "truck_s" text, "driver_s" text, "primary_sponsor_s" text, "owner_s" text, "crew_chief" text ); Question: Who is the driver that has a crew chief Gary Ritter? <|assistant|> SELECT "driver_s" FROM "full_time_teams" WHERE "crew_chief"='gary ritter';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "others_awards_and_nominations" ( "year" real, "result" text, "award" text, "category" text, "nominated_work" text ); Question: what is the award for the 2009 songwriter of the year? <|assistant|> SELECT "award" FROM "others_awards_and_nominations" WHERE "year"=2009 AND "category"='songwriter of the year';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "others_awards_and_nominations" ( "year" real, "result" text, "award" text, "category" text, "nominated_work" text ); Question: what is the category that has the people's choice awards? <|assistant|> SELECT "category" FROM "others_awards_and_nominations" WHERE "award"='people''s choice awards';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "others_awards_and_nominations" ( "year" real, "result" text, "award" text, "category" text, "nominated_work" text ); Question: what year has general nominated in the category or choice breakthrough artist? <|assistant|> SELECT COUNT("year") FROM "others_awards_and_nominations" WHERE "nominated_work"='general' AND "category"='choice breakthrough artist';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_team" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What was the score on 6 February 2008? <|assistant|> SELECT "score" FROM "national_team" WHERE "date"='6 february 2008';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_team" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: Which competition was held on 14 November 2012? <|assistant|> SELECT "competition" FROM "national_team" WHERE "date"='14 november 2012';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_team" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What competition took place on 10 August 2011? <|assistant|> SELECT "competition" FROM "national_team" WHERE "date"='10 august 2011';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the average Year with Chassis equalling cooper t60? <|assistant|> SELECT AVG("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='cooper t60';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Which Chassis has an Entrant of cooper car company, and a Year of 1963? <|assistant|> SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "entrant"='cooper car company' AND "year"=1963;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Which Entrant has an Engine of climax straight-4, and Points larger than 0? <|assistant|> SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "engine"='climax straight-4' AND "points">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_18_itf" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: Which tournament has hard as the surface and apr. 12, 1998 as the date? <|assistant|> SELECT "tournament" FROM "singles_18_itf" WHERE "surface"='hard' AND "date"='apr. 12, 1998';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_18_itf" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: Which surface has wynne prakusya as the opponent in the final? <|assistant|> SELECT "surface" FROM "singles_18_itf" WHERE "opponent_in_the_final"='wynne prakusya';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_18_itf" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: What score has wynne prakusya as the opponent in the final? <|assistant|> SELECT "score" FROM "singles_18_itf" WHERE "opponent_in_the_final"='wynne prakusya';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_18_itf" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: What tournament has nov. 21, 1999 as the date? <|assistant|> SELECT "tournament" FROM "singles_18_itf" WHERE "date"='nov. 21, 1999';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "masterton_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real ); Question: Name the authority for coed gender and chanel college <|assistant|> SELECT "authority" FROM "masterton_district" WHERE "gender"='coed' AND "name"='chanel college';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "masterton_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real ); Question: Name the average decile for state authority and area of fernridge <|assistant|> SELECT AVG("decile") FROM "masterton_district" WHERE "authority"='state' AND "area"='fernridge';<|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 week on October 11, 1998? <|assistant|> SELECT MIN("week") FROM "schedule" WHERE "date"='october 11, 1998';<|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 is the location of the game with attendance of 63,336? <|assistant|> SELECT "game_site" FROM "schedule" WHERE "attendance"='63,336';<|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 date of the week 13 game? <|assistant|> SELECT "date" FROM "schedule" WHERE "week"=13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2007_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: What is the Panthers' Division Record? <|assistant|> SELECT "division_record" FROM "2007_regular_season_football_standings" WHERE "team"='panthers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2007_regular_season_football_standings" ( "school" text, "team" text, "division_record" text, "overall_record" text, "season_outcome" text ); Question: What is the Senators' division record? <|assistant|> SELECT "division_record" FROM "2007_regular_season_football_standings" WHERE "team"='senators';<|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, "record" text ); Question: What was the record after the January 18 game? <|assistant|> SELECT "record" FROM "regular_season" WHERE "date"='january 18';<|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, "record" text ); Question: What was the record after the January 6 game? <|assistant|> SELECT "record" FROM "regular_season" WHERE "date"='january 6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_with_population_below_100" ( "rank" real, "population" real, "name" text, "former_name" text, "municipality" text ); Question: Name the total number of ranks for kujalleq with former name of brattahlíð and population less than 47 <|assistant|> SELECT COUNT("rank") FROM "settlements_with_population_below_100" WHERE "municipality"='kujalleq' AND "former_name"='brattahlíð' AND "population"<47;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "settlements_with_population_below_100" ( "rank" real, "population" real, "name" text, "former_name" text, "municipality" text ); Question: Name the former name for 49 rank <|assistant|> SELECT "former_name" FROM "settlements_with_population_below_100" WHERE "rank"=49;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_six" ( "pick_num" text, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); Question: Which NHL team has left wing listed as the position? <|assistant|> SELECT "nhl_team" FROM "round_six" WHERE "position"='left wing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ruapehu_district" ( "name" text, "years" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What years does Kakahi school, with a decile of 3, have? <|assistant|> SELECT "years" FROM "ruapehu_district" WHERE "decile"=3 AND "name"='kakahi school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ruapehu_district" ( "name" text, "years" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the average decile of Ruapehu college, which has a state authority? <|assistant|> SELECT AVG("decile") FROM "ruapehu_district" WHERE "authority"='state' AND "name"='ruapehu college';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ruapehu_district" ( "name" text, "years" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: What is the roll number of Orautoha school in Raetihi, which has a decile smaller than 8? <|assistant|> SELECT SUM("roll") FROM "ruapehu_district" WHERE "area"='raetihi' AND "name"='orautoha school' AND "decile"<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, "home_away_game" text, "result" text ); Question: On what day was Utah Blaze the opponent? <|assistant|> SELECT "date" FROM "schedule" WHERE "opponent"='utah blaze';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text ); Question: What is the 2006 value with a 1r in 2011? <|assistant|> SELECT "2006" FROM "doubles_performance_timeline" WHERE "2011"='1r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text ); Question: What is the 2010 value with a 2r in 200r and a 3r in 2011? <|assistant|> SELECT "2010" FROM "doubles_performance_timeline" WHERE "2004"='2r' AND "2011"='3r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text ); Question: What is the 2007 value with a 2r in 2012 and 1r in 2002? <|assistant|> SELECT "2007" FROM "doubles_performance_timeline" WHERE "2012"='2r' AND "2002"='1r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text ); Question: What is the 2004 value in the 2011 Grand Slam Tournaments? <|assistant|> SELECT "2004" FROM "doubles_performance_timeline" WHERE "2011"='grand slam tournaments';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_performance_timeline" ( "tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text ); Question: What is the 2004 value with a sf in 2010? <|assistant|> SELECT "2004" FROM "doubles_performance_timeline" WHERE "2010"='sf';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "canadian_open" ( "year" text, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Who played women's singles in 2002? <|assistant|> SELECT "women_s_singles" FROM "canadian_open" WHERE "year"='2002';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "canadian_open" ( "year" text, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Who played men's doubles in 1963? <|assistant|> SELECT "men_s_doubles" FROM "canadian_open" WHERE "year"='1963';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "goal_num" real, "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: Name the score for 30 january 2013 <|assistant|> SELECT "score" FROM "international_goals" WHERE "date"='30 january 2013';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "goal_num" real, "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: Name the result for goal # more than 4 <|assistant|> SELECT "result" FROM "international_goals" WHERE "goal_num">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What is Fred Couples to par? <|assistant|> SELECT "to_par" FROM "first_round" WHERE "player"='fred couples';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); Question: What place has a score under 68? <|assistant|> SELECT "place" FROM "first_round" WHERE "score"<68;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); Question: Which driver won when o.m. was the winning constructor ? <|assistant|> SELECT "winning_driver" FROM "other_grands_prix" WHERE "winning_constructor"='o.m.';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); Question: Which driver won when the winning constructor was bugatti at the Boulogne Grand Prix ? <|assistant|> SELECT "winning_driver" FROM "other_grands_prix" WHERE "winning_constructor"='bugatti' AND "name"='boulogne grand prix';<|endoftext|>