text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "waitaki_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the total roll with a decile less than 7, and an authority of state, in the Macraes Flat area?
<|assistant|>
SELECT COUNT("roll") FROM "waitaki_district" WHERE "decile"=7 AND "authority"='state' AND "area"='macraes flat';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "waitaki_district" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What year has a decile more than 6, in the Waikouaiti area?
<|assistant|>
SELECT "years" FROM "waitaki_district" WHERE "decile">6 AND "area"='waikouaiti';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indoor" (
"year" text,
"division" text,
"league" text,
"regular_season" text,
"playoffs" text
);
Question: What place did the Nashville Metros place in the 1994/95 Season?
<|assistant|>
SELECT "regular_season" FROM "indoor" WHERE "year"='1994/95';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indoor" (
"year" text,
"division" text,
"league" text,
"regular_season" text,
"playoffs" text
);
Question: What years did the Nashville Metros have Usisl Indoor League?
<|assistant|>
SELECT "year" FROM "indoor" WHERE "league"='usisl indoor';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_4_4" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
Question: Which Round has kim eun-ha as an Opponent?
<|assistant|>
SELECT "round" FROM "singles_4_4" WHERE "opponent"='kim eun-ha';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_4_4" (
"edition" text,
"round" text,
"date" text,
"surface" text,
"opponent" text,
"result" text
);
Question: Which kind of Edition that has a Surface of clay, and Park Sung-Hee as an opponent?
<|assistant|>
SELECT "edition" FROM "singles_4_4" WHERE "surface"='clay' AND "opponent"='park sung-hee';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the highest gold number count where a county had over 9 golds and 10 silvers?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "total">9 AND "silver">10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronze medals did the country with 7 medals and over 5 silver medals receive?
<|assistant|>
SELECT SUM("bronze") FROM "medal_table" WHERE "total"=7 AND "silver">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_africa_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the date for venue of lord's
<|assistant|>
SELECT "date" FROM "south_africa_in_england" WHERE "venue"='lord''s';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_africa_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the result for venue of lord's
<|assistant|>
SELECT "result" FROM "south_africa_in_england" WHERE "venue"='lord''s';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_africa_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the date for result of eng by 23 runs
<|assistant|>
SELECT "date" FROM "south_africa_in_england" WHERE "result"='eng by 23 runs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_africa_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the date for result of draw, and venue of edgbaston
<|assistant|>
SELECT "date" FROM "south_africa_in_england" WHERE "result"='draw' AND "venue"='edgbaston';<|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" real
);
Question: What is the total number of weeks that the Seahawks had a record of 5-5?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "record"='5-5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_record" (
"name" text,
"period" text,
"matches" text,
"wins" text,
"draws" text,
"losses" text
);
Question: Who has 1 win, 1 loss, and has played 2 matches?
<|assistant|>
SELECT "name" FROM "match_record" WHERE "wins"='1' AND "losses"='1' AND "matches"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_record" (
"name" text,
"period" text,
"matches" text,
"wins" text,
"draws" text,
"losses" text
);
Question: Who has 5 losses and has played 11 matches?
<|assistant|>
SELECT "name" FROM "match_record" WHERE "losses"='5' AND "matches"='11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_record" (
"name" text,
"period" text,
"matches" text,
"wins" text,
"draws" text,
"losses" text
);
Question: How many matches has Mohammad Al-Shamlan played when there is 1 win?
<|assistant|>
SELECT "matches" FROM "match_record" WHERE "wins"='1' AND "name"='mohammad al-shamlan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_record" (
"name" text,
"period" text,
"matches" text,
"wins" text,
"draws" text,
"losses" text
);
Question: How many matches were played when there was 1 draw and 1 win?
<|assistant|>
SELECT "matches" FROM "match_record" WHERE "draws"='1' AND "wins"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the played with lost of 5
<|assistant|>
SELECT "played" FROM "2010_2011_table" WHERE "lost"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the played with points against of points against
<|assistant|>
SELECT "played" FROM "2010_2011_table" WHERE "points_against"='points against';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the tries with tries against of 38
<|assistant|>
SELECT "tries_for" FROM "2010_2011_table" WHERE "tries_against"='38';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the points against when tries against is 51 and points is 52 with played of 22
<|assistant|>
SELECT "points_against" FROM "2010_2011_table" WHERE "played"='22' AND "points"='52' AND "tries_against"='51';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the points against for cwmllynfell rfc
<|assistant|>
SELECT "points_against" FROM "2010_2011_table" WHERE "club"='cwmllynfell rfc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "176_seats_needed_for_a_majority" (
"polling_firm" text,
"date" text,
"link" text,
"psoe" text,
"others" text,
"lead" text
);
Question: What is lead for the Election Results polling firm and has a PSOE of 39.6% 175?
<|assistant|>
SELECT "lead" FROM "176_seats_needed_for_a_majority" WHERE "polling_firm"='election results' AND "psoe"='39.6% 175';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "176_seats_needed_for_a_majority" (
"polling_firm" text,
"date" text,
"link" text,
"psoe" text,
"others" text,
"lead" text
);
Question: What is the PSOE for the Local Elections polling firm?
<|assistant|>
SELECT "psoe" FROM "176_seats_needed_for_a_majority" WHERE "polling_firm"='local elections';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "176_seats_needed_for_a_majority" (
"polling_firm" text,
"date" text,
"link" text,
"psoe" text,
"others" text,
"lead" text
);
Question: Which date has a PSOE of 36.1%?
<|assistant|>
SELECT "date" FROM "176_seats_needed_for_a_majority" WHERE "psoe"='36.1%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: Name the height with 9 floors
<|assistant|>
SELECT "height_ft_m" FROM "timeline_of_tallest_buildings" WHERE "floors"=9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: Name the years as tallest when floors are larger than 18
<|assistant|>
SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "floors">18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "timeline_of_tallest_buildings" (
"name" text,
"street_address" text,
"years_as_tallest" text,
"height_ft_m" text,
"floors" real
);
Question: Tell me the name that has 17 floors
<|assistant|>
SELECT "name" FROM "timeline_of_tallest_buildings" WHERE "floors"=17;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Which was the position for overall less than 254, round less than 5 and pick number less than 13?
<|assistant|>
SELECT "position" FROM "indianapolis_colts_draft_history" WHERE "overall"<254 AND "round"<5 AND "pick_num"<13;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Name the round having an overall of 6
<|assistant|>
SELECT "round" FROM "indianapolis_colts_draft_history" WHERE "overall"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indianapolis_colts_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Name the position of the player from college of virginia
<|assistant|>
SELECT "position" FROM "indianapolis_colts_draft_history" WHERE "college"='virginia';<|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 date of the game that had a goal of 3?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "goal"=3;<|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 date of the game that had a goal of 4?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "goal"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_barclays" (
"player" text,
"country" text,
"score" text,
"to_par" real,
"points" real,
"winnings" real
);
Question: If the points are over 1,613 and a To par under -14, what is the overall score?
<|assistant|>
SELECT "score" FROM "the_barclays" WHERE "points">'1,613' AND "to_par"<-14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the highest rank of a swimmer in lane 5?
<|assistant|>
SELECT MAX("rank") FROM "semifinal_2" WHERE "lane"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the lowest rank of Jens Kruppa in a lane larger than 2?
<|assistant|>
SELECT MIN("rank") FROM "semifinal_2" WHERE "name"='jens kruppa' AND "lane">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Which nationality has a lane of 6 and a rank smaller than 6?
<|assistant|>
SELECT "nationality" FROM "semifinal_2" WHERE "rank"<6 AND "lane"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
Question: What is Tony Jacklin's total?
<|assistant|>
SELECT "total" FROM "missed_the_cut" WHERE "player"='tony jacklin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
Question: What was Todd Hamilton's to par?
<|assistant|>
SELECT "to_par" FROM "missed_the_cut" WHERE "player"='todd hamilton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "missed_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" real
);
Question: When was a game won with more than 11 to par?
<|assistant|>
SELECT "year_s_won" FROM "missed_the_cut" WHERE "to_par">11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rjfm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"station_type" text,
"location" text
);
Question: Where is the place that has a Callsign of DWRJ-FM?
<|assistant|>
SELECT "location" FROM "rjfm_stations" WHERE "callsign"='dwrj-fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rjfm_stations" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"station_type" text,
"location" text
);
Question: Which Power has Location in metro manila
<|assistant|>
SELECT "power_k_w" FROM "rjfm_stations" WHERE "location"='metro manila';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"tier" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
Question: Which tier of the tournament has Mont de Marson in it?
<|assistant|>
SELECT "tier" FROM "doubles_5" WHERE "tournament"='mont de marson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"tier" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
Question: Which date has opponents, Akgul Amanmuradova Nina Bratchikova, in the final?
<|assistant|>
SELECT "date" FROM "doubles_5" WHERE "opponents_in_the_final"='akgul amanmuradova nina bratchikova';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"tier" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
Question: Which date has opponents, Claire De Gubernatis Alexandra Dulgheru, in the final?
<|assistant|>
SELECT "date" FROM "doubles_5" WHERE "opponents_in_the_final"='claire de gubernatis alexandra dulgheru';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"tier" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
Question: What is the score in the touranament of Antalya-Belek?
<|assistant|>
SELECT "score" FROM "doubles_5" WHERE "tournament"='antalya-belek';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_5" (
"date" text,
"tournament" text,
"surface" text,
"tier" text,
"partner" text,
"opponents_in_the_final" text,
"score" text
);
Question: Which date has the tier of Itf $10k?
<|assistant|>
SELECT "date" FROM "doubles_5" WHERE "tier"='itf $10k';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What is the value vs. Zerg with a September 1, 2012 best streak?
<|assistant|>
SELECT "vs_zerg" FROM "statistics" WHERE "as_of_september_1_2012"='best streak';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What is the score vs. all when the score vs. Terran is 159?
<|assistant|>
SELECT "vs_all" FROM "statistics" WHERE "vs_terran"='159';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What is the score vs. Protoss when the score vs. Terran is 10 wins?
<|assistant|>
SELECT "vs_protoss" FROM "statistics" WHERE "vs_terran"='10 wins';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What is the score vs. Zerg with wins as of September 1,2012?
<|assistant|>
SELECT "vs_zerg" FROM "statistics" WHERE "as_of_september_1_2012"='wins';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What is the score vs. Terran when the score vs. Zerg is 69?
<|assistant|>
SELECT "vs_terran" FROM "statistics" WHERE "vs_zerg"='69';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"as_of_september_1_2012" text,
"vs_protoss" text,
"vs_terran" text,
"vs_zerg" text,
"vs_all" text
);
Question: What occurrs as of September 1, 2012 when the value for vs. all is 65.47%?
<|assistant|>
SELECT "as_of_september_1_2012" FROM "statistics" WHERE "vs_all"='65.47%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"score" text,
"result" text,
"attendance" text,
"record" text
);
Question: What is the record of the opponent that has a bye?
<|assistant|>
SELECT "record" FROM "season_schedule" WHERE "opponent"='bye';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "percussion_scholastic_concert_world_clas" (
"ensemble" text,
"gold_medals" real,
"silver_medals" real,
"bronze_medals" real,
"total_medals" real
);
Question: What was the average total medals received by Roland Hayes School when there were 0 gold medals?
<|assistant|>
SELECT AVG("total_medals") FROM "percussion_scholastic_concert_world_clas" WHERE "gold_medals"=0 AND "ensemble"='roland hayes school';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "percussion_scholastic_concert_world_clas" (
"ensemble" text,
"gold_medals" real,
"silver_medals" real,
"bronze_medals" real,
"total_medals" real
);
Question: What was the total number of medals received by James Logan High School when it received less than 1 silver medal?
<|assistant|>
SELECT COUNT("total_medals") FROM "percussion_scholastic_concert_world_clas" WHERE "ensemble"='james logan high school' AND "silver_medals"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "percussion_scholastic_concert_world_clas" (
"ensemble" text,
"gold_medals" real,
"silver_medals" real,
"bronze_medals" real,
"total_medals" real
);
Question: What is the highest number of bronze medals received by an ensemble who received fewer than 0 gold medals?
<|assistant|>
SELECT MAX("bronze_medals") FROM "percussion_scholastic_concert_world_clas" WHERE "gold_medals"<0;<|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 was the Score of the 2008 Africa Cup of Nations Competition?
<|assistant|>
SELECT "score" FROM "international_goals" WHERE "competition"='2008 africa cup of nations';<|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: Name the most goals with losses less than 15 and position more than 8 with points of 42+4
<|assistant|>
SELECT MAX("goals_for") FROM "final_table" WHERE "losses"<15 AND "position">8 AND "points"='42+4';<|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: Name the average goals against for draws of 8 and wins more than 22 with losses less than 12
<|assistant|>
SELECT AVG("goals_against") FROM "final_table" WHERE "draws"=8 AND "losses"<12 AND "wins">22;<|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: Name the least wins for goal difference being less than -20 with position less than 20 and goals for of 35
<|assistant|>
SELECT MIN("wins") FROM "final_table" WHERE "position"<20 AND "goals_for"=35 AND "goal_difference"<-20;<|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: Name the average losses for draws larger than 6 and played more than 38
<|assistant|>
SELECT AVG("losses") FROM "final_table" WHERE "draws">6 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: Name the least goals against for played more than 38
<|assistant|>
SELECT MIN("goals_against") FROM "final_table" WHERE "played">38;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: After 1961, who as the Entrant when the engine was a Ferrari v8, and when the points were lower than 23?
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_results" WHERE "year">1961 AND "engine"='ferrari v8' AND "points"<23;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What is was the Chassis in 1967?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_results" WHERE "year"=1967;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: In 1962, what was the total number of points, when the Engine was Ferrari v6?
<|assistant|>
SELECT COUNT("points") FROM "complete_formula_one_results" WHERE "engine"='ferrari v6' AND "year"=1962;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: In 1961, what was the Chassis when the points were lower than 6?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_results" WHERE "points"<6 AND "year"=1961;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What was the sum of the years, when the entrant was Scuderia Ferrari, and when the Chassis was Ferrari 312/66?
<|assistant|>
SELECT SUM("year") FROM "complete_formula_one_results" WHERE "entrant"='scuderia ferrari' AND "chassis"='ferrari 312/66';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?
<|assistant|>
SELECT SUM("year") FROM "complete_formula_one_results" WHERE "entrant"='scuderia centro sud' AND "points"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "palmerston_north_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" text
);
Question: In the tkkm o manawatu coed school in kelvin grove, what is the Authority listed/
<|assistant|>
SELECT "authority" FROM "palmerston_north_city" WHERE "gender"='coed' AND "area"='kelvin grove' AND "name"='tkkm o manawatu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "palmerston_north_city" (
"name" text,
"years" text,
"gender" text,
"area" text,
"authority" text,
"decile" real,
"roll" text
);
Question: which Authority has a coed school with a decile greater than 4, with a 150 roll?
<|assistant|>
SELECT "authority" FROM "palmerston_north_city" WHERE "gender"='coed' AND "decile">4 AND "roll"='150';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"country" text,
"film_title_used_in_nomination" text,
"language" text,
"original_title" text,
"director" text
);
Question: Name the language for trotta
<|assistant|>
SELECT "language" FROM "references" WHERE "original_title"='trotta';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"country" text,
"film_title_used_in_nomination" text,
"language" text,
"original_title" text,
"director" text
);
Question: Name the original title directed by luis buñuel
<|assistant|>
SELECT "original_title" FROM "references" WHERE "director"='luis buñuel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"country" text,
"film_title_used_in_nomination" text,
"language" text,
"original_title" text,
"director" text
);
Question: Name the original title directed by sudhendu roy
<|assistant|>
SELECT "original_title" FROM "references" WHERE "director"='sudhendu roy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"country" text,
"film_title_used_in_nomination" text,
"language" text,
"original_title" text,
"director" text
);
Question: Name the film title that is spanish from peru
<|assistant|>
SELECT "film_title_used_in_nomination" FROM "references" WHERE "language"='spanish' AND "country"='peru';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"country" text,
"film_title_used_in_nomination" text,
"language" text,
"original_title" text,
"director" text
);
Question: Name the langauge for switzerland
<|assistant|>
SELECT "language" FROM "references" WHERE "country"='switzerland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the Total with 0 Silver and Gold, 1 Bronze and Rank larger than 2?
<|assistant|>
SELECT MIN("total") FROM "performances_by_nation" WHERE "rank">2 AND "bronze"=1 AND "silver">0 AND "gold"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances_by_nation" (
"rank" real,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many Bronze medals were received by the nation that Ranked less than 5 and received more than 2 Gold medals, less than 4 Silver medals with a Total of 9 medals?
<|assistant|>
SELECT AVG("bronze") FROM "performances_by_nation" WHERE "rank"<5 AND "gold">2 AND "total"=9 AND "silver"<4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "chiroptera" (
"name" text,
"species_authority" text,
"order" text,
"family" text,
"red_list" real
);
Question: which order of bat belongs to the family of vespertilionidae and includes the northern long-eared myotis?
<|assistant|>
SELECT "order" FROM "chiroptera" WHERE "family"='vespertilionidae' AND "name"='northern long-eared myotis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"team" text,
"co_drivers" text,
"class" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What year has WSC class?
<|assistant|>
SELECT "year" FROM "24_hours_of_le_mans_results" WHERE "class"='wsc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1996_97_season_as_a_four_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"jockey" text,
"winner_2nd" text
);
Question: Which race has D. Beadman for the jockey and a 4th place result?
<|assistant|>
SELECT "race" FROM "1996_97_season_as_a_four_year_old" WHERE "jockey"='d. beadman' AND "result"='4th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: What is the 1st party with Charles Isaac Elton as the 2nd member?
<|assistant|>
SELECT "1st_party" FROM "members_of_parliament" WHERE "2nd_member"='charles isaac elton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: Which election had Sir Alexander Fuller-Acland-Hood, bt as the 2nd member?
<|assistant|>
SELECT "election" FROM "members_of_parliament" WHERE "2nd_member"='sir alexander fuller-acland-hood, bt';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: Who is the 2nd member of the conservative 1st party, which had Vaughan Lee as the 1st member, in the election of 1874?
<|assistant|>
SELECT "2nd_member" FROM "members_of_parliament" WHERE "1st_party"='conservative' AND "1st_member"='vaughan lee' AND "election"='1874';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: What is the 2nd party for a conservative 1st party with a 1st member Charles Moody in the election of 1851 by-election?
<|assistant|>
SELECT "2nd_party" FROM "members_of_parliament" WHERE "1st_party"='conservative' AND "1st_member"='charles moody' AND "election"='1851 by-election';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: Who is the 1st member in the 1884 by-election?
<|assistant|>
SELECT "1st_member" FROM "members_of_parliament" WHERE "election"='1884 by-election';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members_of_parliament" (
"election" text,
"1st_member" text,
"1st_party" text,
"2nd_member" text,
"2nd_party" text
);
Question: What is the 2nd party in the 1874 election?
<|assistant|>
SELECT "2nd_party" FROM "members_of_parliament" WHERE "election"='1874';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "january_secondary_phase" (
"round" real,
"name" text,
"position" text,
"school" text,
"signed" text
);
Question: Which school had a player who played the C position?
<|assistant|>
SELECT "school" FROM "january_secondary_phase" WHERE "position"='c';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"game" real,
"date" text,
"score" text,
"location" text,
"time" text,
"attendance" real
);
Question: Which game is on the date October 16?
<|assistant|>
SELECT AVG("game") FROM "summary" WHERE "date"='october 16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2009 value with a q1 in 2006 in the French Open?
<|assistant|>
SELECT "2009" FROM "singles_performance_timeline" WHERE "2006"='q1' AND "tournament"='french open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2010 value with a 2r in 2008 and A in 2013?
<|assistant|>
SELECT "2010" FROM "singles_performance_timeline" WHERE "2008"='2r' AND "2013"='a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2007 value with 1r in 2009 in the US Open?
<|assistant|>
SELECT "2007" FROM "singles_performance_timeline" WHERE "2009"='1r' AND "tournament"='us open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2009 value in the 2011 Grand Slam Tournaments?
<|assistant|>
SELECT "2009" FROM "singles_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 "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2005 value with 1r in 2013 and q2 in 2011?
<|assistant|>
SELECT "2005" FROM "singles_performance_timeline" WHERE "2013"='1r' AND "2011"='q2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
);
Question: What is the 2010 value in the Australian Open?
<|assistant|>
SELECT "2010" FROM "singles_performance_timeline" WHERE "tournament"='australian open';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "low_power_translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: what is the city of license for the station with the frequency mhz less than 102.3 abd erp w of 25?
<|assistant|>
SELECT "city_of_license" FROM "low_power_translators" WHERE "frequency_m_hz"<102.3 AND "erp_w"=25;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "low_power_translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: \What is the class of the station with the call sign w254ah?
<|assistant|>
SELECT "class" FROM "low_power_translators" WHERE "call_sign"='w254ah';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "low_power_translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: what is the class of the station with erp w more than 30?
<|assistant|>
SELECT "class" FROM "low_power_translators" WHERE "erp_w">30;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "low_power_translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: what is the highest frequency mhz with the call sign w292cu?
<|assistant|>
SELECT MAX("frequency_m_hz") FROM "low_power_translators" WHERE "call_sign"='w292cu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "drivers_and_constructors" (
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text,
"driver" text,
"rounds" text
);
Question: Which constructor makes the ej15 ej15b chassis?
<|assistant|>
SELECT "constructor" FROM "drivers_and_constructors" WHERE "chassis"='ej15 ej15b';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.