text stringlengths 310 1.28k |
|---|
<|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" text
);
Question: What round has mathieu garon as the player?
<|assistant|>
SELECT "round" FROM "draft_picks" WHERE "player"='mathieu garon';<|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" text
);
Question: What nationality has a position of left wing, and a round greater than 4, with mattia baldi as the player?
<|assistant|>
SELECT "nationality" FROM "draft_picks" WHERE "position"='left wing' AND "round">4 AND "player"='mattia baldi';<|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" text
);
Question: How many rounds have goalie as the position?
<|assistant|>
SELECT SUM("round") FROM "draft_picks" WHERE "position"='goalie';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
Question: Which Competition has a Date of may 2, 1993?
<|assistant|>
SELECT "competition" FROM "international_goals" WHERE "date"='may 2, 1993';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
Question: Which Result has a Goal larger than 6, and a Score of 1–0, and a Competition of friendly, and a Date of may 31, 1998?
<|assistant|>
SELECT "result" FROM "international_goals" WHERE "goal">6 AND "score"='1–0' AND "competition"='friendly' AND "date"='may 31, 1998';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
Question: What was the score on april 4, 1993?
<|assistant|>
SELECT "score" FROM "international_goals" WHERE "date"='april 4, 1993';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What is listed for the 3 credits that also has a 2 credits of 99.7%?
<|assistant|>
SELECT "3_credits" FROM "deuces_wild" WHERE "2_credits"='99.7%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What's the listed Hand has 3 credits of 6?
<|assistant|>
SELECT "hand" FROM "deuces_wild" WHERE "3_credits"='6';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What is listed for the 4 credits that has 5 credits of 125?
<|assistant|>
SELECT "4_credits" FROM "deuces_wild" WHERE "5_credits"='125';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What is listed for 5 credits that has 1 credit of 300?
<|assistant|>
SELECT "5_credits" FROM "deuces_wild" WHERE "1_credit"='300';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What's the 1 credit with a Hand of Theoretical Return?
<|assistant|>
SELECT "1_credit" FROM "deuces_wild" WHERE "hand"='theoretical return';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "deuces_wild" (
"hand" text,
"1_credit" text,
"2_credits" text,
"3_credits" text,
"4_credits" text,
"5_credits" text
);
Question: What is listed for the Hand that has a 1 credit of 1?
<|assistant|>
SELECT "hand" FROM "deuces_wild" WHERE "1_credit"='1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "alabama" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" text,
"class" text,
"hometown" text,
"games" real
);
Question: What is the games number when the Position was wr, and a Number larger than 17?
<|assistant|>
SELECT COUNT("games") FROM "alabama" WHERE "position"='wr' AND "number">17;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "alabama" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" text,
"class" text,
"hometown" text,
"games" real
);
Question: What is the number when the height shows 6'6"', and a Games number smaller than 4?
<|assistant|>
SELECT AVG("number") FROM "alabama" WHERE "height"='6''6\"''' AND "games"<4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "alabama" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" text,
"class" text,
"hometown" text,
"games" real
);
Question: What is the class for the position of lg?
<|assistant|>
SELECT "class" FROM "alabama" WHERE "position"='lg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_02_season_as_a_five_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"jockey" text,
"winner_2nd" text
);
Question: What is the highest weight for the Farnley Stakes race?
<|assistant|>
SELECT MAX("weight_kg") FROM "2001_02_season_as_a_five_year_old" WHERE "race"='farnley stakes';<|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,
"date" text,
"round" real,
"time" text,
"location" text
);
Question: What time is associated with the event that happened in Tokyo, Japan, ending in a draw, with 3 rounds?
<|assistant|>
SELECT "time" FROM "mixed_martial_arts_record" WHERE "location"='tokyo, japan' AND "round"=3 AND "res"='draw';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_men_s_doubles_performance_tim" (
"tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"career_sr" text,
"career_win_loss" text
);
Question: Which 2012 has a 2007 of 0 / 4?
<|assistant|>
SELECT "2012" FROM "grand_slam_men_s_doubles_performance_tim" WHERE "2007"='0 / 4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_men_s_doubles_performance_tim" (
"tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"career_sr" text,
"career_win_loss" text
);
Question: Which 2011 has a Career Win-Loss of 7–10?
<|assistant|>
SELECT "2011" FROM "grand_slam_men_s_doubles_performance_tim" WHERE "career_win_loss"='7–10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_men_s_doubles_performance_tim" (
"tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"career_sr" text,
"career_win_loss" text
);
Question: Which 1998 has a 2002 of 2–4?
<|assistant|>
SELECT "1998" FROM "grand_slam_men_s_doubles_performance_tim" WHERE "2002"='2–4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_men_s_doubles_performance_tim" (
"tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"career_sr" text,
"career_win_loss" text
);
Question: Which 2002 has a 2008 of 3–3?
<|assistant|>
SELECT "2002" FROM "grand_slam_men_s_doubles_performance_tim" WHERE "2008"='3–3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_men_s_doubles_performance_tim" (
"tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"career_sr" text,
"career_win_loss" text
);
Question: Which 2003 has a 2012 of 1r, and a 2008 of 1r?
<|assistant|>
SELECT "2003" FROM "grand_slam_men_s_doubles_performance_tim" WHERE "2012"='1r' AND "2008"='1r';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team_players_in_the_nfl" (
"player" text,
"position" text,
"round" real,
"pick" real,
"nfl_club" text
);
Question: What club is robert gallery a part of
<|assistant|>
SELECT "nfl_club" FROM "team_players_in_the_nfl" WHERE "player"='robert gallery';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cintas_center" (
"season" text,
"record" text,
"pct" real,
"games" real,
"attendance" real,
"average" real,
"sellouts" real
);
Question: How many attendance numbers had more than 15 games, and sellouts of more than 8 in the 2011-12 season?
<|assistant|>
SELECT COUNT("attendance") FROM "cintas_center" WHERE "games">15 AND "sellouts">8 AND "season"='2011-12';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cintas_center" (
"season" text,
"record" text,
"pct" real,
"games" real,
"attendance" real,
"average" real,
"sellouts" real
);
Question: What's the mean attendance number when the record is 12-4 and the average is less than 10,027?
<|assistant|>
SELECT AVG("attendance") FROM "cintas_center" WHERE "record"='12-4' AND "average"<'10,027';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cintas_center" (
"season" text,
"record" text,
"pct" real,
"games" real,
"attendance" real,
"average" real,
"sellouts" real
);
Question: What is the full amount of averages when the sellouts are less than 14, the season is 2011-12, and attendance is less than 162,474?
<|assistant|>
SELECT COUNT("average") FROM "cintas_center" WHERE "sellouts"<14 AND "season"='2011-12' AND "attendance"<'162,474';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_medalists" (
"medal" text,
"name" text,
"games" text,
"sport" text,
"event" text
);
Question: What medal was awarded in the men's freestyle 52 kg?
<|assistant|>
SELECT "medal" FROM "list_of_medalists" WHERE "event"='men''s freestyle 52 kg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_25" real,
"events" real,
"cuts_made" real
);
Question: Events smaller than 1 had what highest cuts made?
<|assistant|>
SELECT MAX("cuts_made") FROM "summary" WHERE "events"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_brasileiro_s_rie_c" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What position was played with a Difference of - 5, and a Played larger than 14?
<|assistant|>
SELECT AVG("position") FROM "campeonato_brasileiro_s_rie_c" WHERE "difference"='- 5' AND "played">14;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_brasileiro_s_rie_c" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: How many games lost associated with under 14 played?
<|assistant|>
SELECT COUNT("lost") FROM "campeonato_brasileiro_s_rie_c" WHERE "played"<14;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_brasileiro_s_rie_c" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: How many games against for team guarani with under 3 draws?
<|assistant|>
SELECT SUM("against") FROM "campeonato_brasileiro_s_rie_c" WHERE "team"='guarani' AND "drawn"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislative_history" (
"congress" text,
"bill_number_s" text,
"date_introduced" text,
"sponsor_s" text,
"num_of_cosponsors" real,
"latest_status" text
);
Question: What Congress had less than 23 cosponsors and had June 30, 2005 as the date of introduction of the bill?
<|assistant|>
SELECT "congress" FROM "legislative_history" WHERE "num_of_cosponsors"<23 AND "date_introduced"='june 30, 2005';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislative_history" (
"congress" text,
"bill_number_s" text,
"date_introduced" text,
"sponsor_s" text,
"num_of_cosponsors" real,
"latest_status" text
);
Question: Who sponsored the bill introduced on June 9, 2011?
<|assistant|>
SELECT "sponsor_s" FROM "legislative_history" WHERE "date_introduced"='june 9, 2011';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "legislative_history" (
"congress" text,
"bill_number_s" text,
"date_introduced" text,
"sponsor_s" text,
"num_of_cosponsors" real,
"latest_status" text
);
Question: Who sponsored the bill that was introduced on June 2, 2009?
<|assistant|>
SELECT "sponsor_s" FROM "legislative_history" WHERE "date_introduced"='june 2, 2009';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_12_6_6" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What is the Outcome of the Melbourne Tournament?
<|assistant|>
SELECT "outcome" FROM "doubles_12_6_6" WHERE "tournament"='melbourne';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_12_6_6" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: In what Tournament was Janet Young a Partner?
<|assistant|>
SELECT "tournament" FROM "doubles_12_6_6" WHERE "partner"='janet young';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_12_6_6" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
);
Question: What was the Outcome of the match with a Score of w/o?
<|assistant|>
SELECT "outcome" FROM "doubles_12_6_6" WHERE "score"='w/o';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"76ers_points" real,
"opponent_points" real,
"record" text,
"streak" text
);
Question: Which Date has a Result of win, and a Streak of won 2, and 76ers points of 96, and a Record of 20-50?
<|assistant|>
SELECT "date" FROM "season_schedule" WHERE "result"='win' AND "streak"='won 2' AND "76ers_points"=96 AND "record"='20-50';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"game" real,
"date" text,
"opponent" text,
"result" text,
"76ers_points" real,
"opponent_points" real,
"record" text,
"streak" text
);
Question: Which Date has a Streak of lost 1, and 76ers points smaller than 94, and a Game larger than 13, and a Record of 14-40?
<|assistant|>
SELECT "date" FROM "season_schedule" WHERE "streak"='lost 1' AND "76ers_points"<94 AND "game">13 AND "record"='14-40';<|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 school or club team has a pick of 139?
<|assistant|>
SELECT "school_club_team" FROM "nfl_draft" WHERE "pick"=139;<|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: What is the pick number for the player playing tackle position, and a round less than 15?
<|assistant|>
SELECT SUM("pick") FROM "nfl_draft" WHERE "position"='tackle' AND "round"<15;<|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 school of club team has a pick of 46?
<|assistant|>
SELECT "school_club_team" FROM "nfl_draft" WHERE "pick"=46;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: Who got 59.486 for Qual 2?
<|assistant|>
SELECT "name" FROM "qualifying_results" WHERE "qual_2"='59.486';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: Who got 59.578 for Qual 1?
<|assistant|>
SELECT "name" FROM "qualifying_results" WHERE "qual_1"='59.578';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: What team was Andrew Ranger in?
<|assistant|>
SELECT "team" FROM "qualifying_results" WHERE "name"='andrew ranger';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: What team has 59.372 for qual 1?
<|assistant|>
SELECT "team" FROM "qualifying_results" WHERE "qual_1"='59.372';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_results" (
"name" text,
"team" text,
"qual_1" text,
"qual_2" text,
"best" text
);
Question: What did Alex Tagliani get for Qual 1?
<|assistant|>
SELECT "qual_1" FROM "qualifying_results" WHERE "name"='alex tagliani';<|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,
"attendance" text
);
Question: What was the result of the game on November 7, 1999?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "date"='november 7, 1999';<|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,
"attendance" text
);
Question: When was the game before week 15 with the result of bye?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week"<15 AND "result"='bye';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "film" (
"year" real,
"title" text,
"director" text,
"writer" text,
"notes" text
);
Question: Who is the writer of Wallace & Gromit: A Close Shave, a short film from before 2008?
<|assistant|>
SELECT "writer" FROM "film" WHERE "year"<2008 AND "notes"='short film' AND "title"='wallace & gromit: a close shave';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "film" (
"year" real,
"title" text,
"director" text,
"writer" text,
"notes" text
);
Question: What notes did the creature comforts film have?
<|assistant|>
SELECT "notes" FROM "film" WHERE "title"='creature comforts';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "film" (
"year" real,
"title" text,
"director" text,
"writer" text,
"notes" text
);
Question: Who is the director of Wallace & Gromit: The Curse of the Were-Rabbit?
<|assistant|>
SELECT "director" FROM "film" WHERE "title"='wallace & gromit: the curse of the were-rabbit';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "film" (
"year" real,
"title" text,
"director" text,
"writer" text,
"notes" text
);
Question: What is the earliest year of Wallace & Gromit: The Curse of the Were-Rabbit?
<|assistant|>
SELECT MIN("year") FROM "film" WHERE "title"='wallace & gromit: the curse of the were-rabbit';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"race" text,
"length" text,
"class" text,
"circuit" text,
"date" text
);
Question: what was the length of the game on may 19
<|assistant|>
SELECT "length" FROM "schedule" WHERE "date"='may 19';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
Question: March of 26 has what lowest game?
<|assistant|>
SELECT MIN("game") FROM "schedule_and_results" WHERE "march"=26;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
Question: March of 29 involves what highest scoring game?
<|assistant|>
SELECT MAX("game") FROM "schedule_and_results" WHERE "march"=29;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"march" real,
"opponent" text,
"score" text,
"record" text
);
Question: Game larger than 76, and a March larger than 26 involves what score?
<|assistant|>
SELECT "score" FROM "schedule_and_results" WHERE "game">76 AND "march">26;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
Question: What was the time when the laps were smaller than 66 and the grid was 15?
<|assistant|>
SELECT "time_retired" FROM "race" WHERE "laps"<66 AND "grid"=15;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
Question: What was the grid for anthony davidson when the laps were less than 8?
<|assistant|>
SELECT COUNT("grid") FROM "race" WHERE "driver"='anthony davidson' AND "laps"<8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
Question: What team did carlos cardus drive for in 1983 when he got less than 21 points?
<|assistant|>
SELECT "team" FROM "motorcycle_grand_prix_results" WHERE "points"<21 AND "year"=1983;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
Question: What is the sum of the points when Carlos drove for repsol honda in 8th place?
<|assistant|>
SELECT SUM("points") FROM "motorcycle_grand_prix_results" WHERE "team"='repsol honda' AND "rank"='8th';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
Question: What is the average points won when Carlos had 0 wins?
<|assistant|>
SELECT AVG("points") FROM "motorcycle_grand_prix_results" WHERE "wins"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"rank" text,
"wins" real
);
Question: What is the highest year that Carlos drove for repsol honda and had less than 4 wins and less than 162 points?
<|assistant|>
SELECT MAX("year") FROM "motorcycle_grand_prix_results" WHERE "team"='repsol honda' AND "wins"<4 AND "points"<162;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "castleford_tigers_career" (
"year" text,
"team" text,
"apps" real,
"tries" real,
"goals" real,
"points" real
);
Question: What is the total number of goals from 24 tries and 96 or greater points?
<|assistant|>
SELECT SUM("goals") FROM "castleford_tigers_career" WHERE "tries"=24 AND "points">96;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "castleford_tigers_career" (
"year" text,
"team" text,
"apps" real,
"tries" real,
"goals" real,
"points" real
);
Question: What year has tries less than 24 and 0 points?
<|assistant|>
SELECT "year" FROM "castleford_tigers_career" WHERE "tries"<24 AND "points"=0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: What Game has a Location of Philadelphia Spectrum and an Opponent of New York Knicks?
<|assistant|>
SELECT "game" FROM "game_log" WHERE "location"='philadelphia spectrum' AND "opponent"='new york knicks';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: What Game has a Location of Philadelphia Spectrum and a Date of April 1?
<|assistant|>
SELECT "game" FROM "game_log" WHERE "location"='philadelphia spectrum' AND "date"='april 1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_15_2010" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
Question: What is the segment for Netflix episode S08E04?
<|assistant|>
SELECT "segment_a" FROM "season_15_2010" WHERE "netflix"='s08e04';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_15_2010" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
Question: What is the Netflix episode for series episode 15-01?
<|assistant|>
SELECT "netflix" FROM "season_15_2010" WHERE "series_ep"='15-01';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_15_2010" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
Question: What is the segment A for the episode with Children's Ride-on Cars for segment D?
<|assistant|>
SELECT "segment_a" FROM "season_15_2010" WHERE "segment_d"='children''s ride-on cars';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: What is the earliest year with fewer than 5 wins and 89 points?
<|assistant|>
SELECT MIN("year") FROM "motorcycle_grand_prix_results" WHERE "wins"<5 AND "points"=89;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: When is the most recent year with more than 27 points and more than 5 wins?
<|assistant|>
SELECT MAX("year") FROM "motorcycle_grand_prix_results" WHERE "points">27 AND "wins">5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: What are the sum of points in 1989 with 0 wins?
<|assistant|>
SELECT SUM("points") FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "year"=1989;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: Which class has fewer than 89 points and the Honda team later than 1987?
<|assistant|>
SELECT "class" FROM "motorcycle_grand_prix_results" WHERE "points"<89 AND "team"='honda' AND "year">1987;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "motorcycle_grand_prix_results" (
"year" real,
"class" text,
"team" text,
"points" real,
"wins" real
);
Question: How many points are there later than 1992?
<|assistant|>
SELECT COUNT("points") FROM "motorcycle_grand_prix_results" WHERE "year">1992;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_in_sports" (
"date" text,
"event" text,
"location" text,
"attendance" text,
"ppv_buyrate" text
);
Question: Where was the event on June 10?
<|assistant|>
SELECT "location" FROM "2011_in_sports" WHERE "date"='june 10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_in_sports" (
"date" text,
"event" text,
"location" text,
"attendance" text,
"ppv_buyrate" text
);
Question: What event was in New Orleans, Louisiana, USA?
<|assistant|>
SELECT "event" FROM "2011_in_sports" WHERE "location"='new orleans, louisiana, usa';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2011_in_sports" (
"date" text,
"event" text,
"location" text,
"attendance" text,
"ppv_buyrate" text
);
Question: On September 10 during Strikeforce: Heavyweight Grand Prix Semifinals, what was the PPV buyrate?
<|assistant|>
SELECT "ppv_buyrate" FROM "2011_in_sports" WHERE "date"='september 10' AND "event"='strikeforce: heavyweight grand prix semifinals';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"game" real,
"november" real,
"opponent" text,
"score" text,
"record" text,
"points" real
);
Question: How many points are there on november 7?
<|assistant|>
SELECT MAX("points") FROM "regular_season" WHERE "november"=7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
Question: What was the score in the game where the Blazers were the home team?
<|assistant|>
SELECT "score" FROM "march" WHERE "home"='blazers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
Question: How many people attended the game that had the Clippers as visiting team?
<|assistant|>
SELECT "attendance" FROM "march" WHERE "visitor"='clippers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qwik_liner_las_vegas_350" (
"pos" real,
"car_num" real,
"driver" text,
"make" text,
"team" text
);
Question: Which team has a car # before 99, a Toyota, and is driven by Mike Skinner?
<|assistant|>
SELECT "team" FROM "qwik_liner_las_vegas_350" WHERE "car_num"<99 AND "make"='toyota' AND "driver"='mike skinner';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qwik_liner_las_vegas_350" (
"pos" real,
"car_num" real,
"driver" text,
"make" text,
"team" text
);
Question: What is the lowest position for driver Kyle Busch?
<|assistant|>
SELECT MIN("pos") FROM "qwik_liner_las_vegas_350" WHERE "driver"='kyle busch';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qwik_liner_las_vegas_350" (
"pos" real,
"car_num" real,
"driver" text,
"make" text,
"team" text
);
Question: Who is the team of the Chevrolet, and has a position less than 7, for car # 88?
<|assistant|>
SELECT "team" FROM "qwik_liner_las_vegas_350" WHERE "make"='chevrolet' AND "pos"<7 AND "car_num"=88;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c_sar_awards" (
"year" real,
"group" text,
"award" text,
"film" text,
"result" text
);
Question: Which Film has a Result of nominated, and a Year of 2001?
<|assistant|>
SELECT "film" FROM "c_sar_awards" WHERE "result"='nominated' AND "year"=2001;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c_sar_awards" (
"year" real,
"group" text,
"award" text,
"film" text,
"result" text
);
Question: Which Award has a Group of césar awards, and a Result of nominated, and a Year larger than 2001, and a Film of 8 women (8 femmes)?
<|assistant|>
SELECT "award" FROM "c_sar_awards" WHERE "group"='césar awards' AND "result"='nominated' AND "year">2001 AND "film"='8 women (8 femmes)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c_sar_awards" (
"year" real,
"group" text,
"award" text,
"film" text,
"result" text
);
Question: Which Year has a Group of césar awards, and a Result of nominated, and an Award of the best actress, and a Film of 8 women (8 femmes)?
<|assistant|>
SELECT AVG("year") FROM "c_sar_awards" WHERE "group"='césar awards' AND "result"='nominated' AND "award"='best actress' AND "film"='8 women (8 femmes)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c_sar_awards" (
"year" real,
"group" text,
"award" text,
"film" text,
"result" text
);
Question: Which Award has a Result of nominated, and a Year of 2003?
<|assistant|>
SELECT "award" FROM "c_sar_awards" WHERE "result"='nominated' AND "year"=2003;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "c_sar_awards" (
"year" real,
"group" text,
"award" text,
"film" text,
"result" text
);
Question: Which Result has a Year larger than 2003, and an Award of best supporting actress?
<|assistant|>
SELECT "result" FROM "c_sar_awards" WHERE "year">2003 AND "award"='best supporting actress';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "voting_details" (
"constituency" text,
"electorate" real,
"turnout" text,
"spoilt" text,
"valid_poll" real,
"quota" text,
"seats" real,
"candidates" real
);
Question: Name the total number of valid poll with seats more than 4 and candidates more than 9
<|assistant|>
SELECT COUNT("valid_poll") FROM "voting_details" WHERE "seats">4 AND "candidates">9;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "voting_details" (
"constituency" text,
"electorate" real,
"turnout" text,
"spoilt" text,
"valid_poll" real,
"quota" text,
"seats" real,
"candidates" real
);
Question: Name the least valid poll for munster
<|assistant|>
SELECT MIN("valid_poll") FROM "voting_details" WHERE "constituency"='munster';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "voting_details" (
"constituency" text,
"electorate" real,
"turnout" text,
"spoilt" text,
"valid_poll" real,
"quota" text,
"seats" real,
"candidates" real
);
Question: Name the average valid poll for seats less than 3
<|assistant|>
SELECT AVG("valid_poll") FROM "voting_details" WHERE "seats"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Catalog has a Format of 12" maxi, and a Region of france?
<|assistant|>
SELECT "catalog" FROM "release_history" WHERE "format"='12\" maxi' AND "region"='france';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Label has a Format of 7" single, and a Date of 1988?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "format"='7\" single' AND "date"='1988';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Label has a Region of germany, and a Format of 12" maxi?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "region"='germany' AND "format"='12\" maxi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Label has a Region of canada?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "region"='canada';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Date has a Catalog of 887 195-2, and a Format of cd maxi?
<|assistant|>
SELECT "date" FROM "release_history" WHERE "catalog"='887 195-2' AND "format"='cd maxi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"date" text,
"label" text,
"region" text,
"format" text,
"catalog" text
);
Question: Which Date has a Region of france?
<|assistant|>
SELECT "date" FROM "release_history" WHERE "region"='france';<|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 Time has an Opponent of shamil abdurahimov?
<|assistant|>
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='shamil abdurahimov';<|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 Record has an Event of cage rage 23?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "event"='cage rage 23';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.