text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What were the notes in Toronto, Canada?
<|assistant|>
SELECT "notes" FROM "achievements" WHERE "venue"='toronto, canada';<|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: Name the most points for class of 125cc and team of mv agusta with year more than 1957
<|assistant|>
SELECT MAX("points") FROM "motorcycle_grand_prix_results" WHERE "class"='125cc' AND "team"='mv agusta' AND "year">1957;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "titles_by_beyond_software" (
"title" text,
"genre" text,
"c_64" text,
"zx_spectrum" text,
"others" text,
"year" real,
"format" text
);
Question: Which ZX Spectrum has a Year larger than 1984, and a Genre of arcade/strategy?
<|assistant|>
SELECT "zx_spectrum" FROM "titles_by_beyond_software" WHERE "year">1984 AND "genre"='arcade/strategy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "titles_by_beyond_software" (
"title" text,
"genre" text,
"c_64" text,
"zx_spectrum" text,
"others" text,
"year" real,
"format" text
);
Question: How many years have a Title of kriegspiel?
<|assistant|>
SELECT COUNT("year") FROM "titles_by_beyond_software" WHERE "title"='kriegspiel';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "titles_by_beyond_software" (
"title" text,
"genre" text,
"c_64" text,
"zx_spectrum" text,
"others" text,
"year" real,
"format" text
);
Question: Which ZX Spectrum has a C=64 of c64, and a Title of ankh?
<|assistant|>
SELECT "zx_spectrum" FROM "titles_by_beyond_software" WHERE "c_64"='c64' AND "title"='ankh';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "titles_by_beyond_software" (
"title" text,
"genre" text,
"c_64" text,
"zx_spectrum" text,
"others" text,
"year" real,
"format" text
);
Question: Which Title has Others of amstrad cpc, and a Genre of arcade?
<|assistant|>
SELECT "title" FROM "titles_by_beyond_software" WHERE "others"='amstrad cpc' AND "genre"='arcade';<|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,
"venue" text,
"attendance" text,
"record" text
);
Question: What was the result when the attendance was 12,000?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "attendance"='12,000';<|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,
"venue" text,
"attendance" text,
"record" text
);
Question: What was the attendance for weeks prior to 5 when there was no game scheduled?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "week"<5 AND "date"='no game scheduled';<|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,
"venue" text,
"attendance" text,
"record" text
);
Question: What was the attendance number for the venue of Lakeside Park?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "venue"='lakeside park';<|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,
"venue" text,
"attendance" text,
"record" text
);
Question: What is the largest week number for the venue of League Park for the date of November 25, 1920?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "venue"='league park' AND "date"='november 25, 1920';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: What is Michael's surname?
<|assistant|>
SELECT "surname" FROM "player_roster" WHERE "first"='michael';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977?
<|assistant|>
SELECT "first" FROM "player_roster" WHERE "bats"='r' AND "throws"='l' AND "d_o_b"='12 october 1977';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: When was Maat born?
<|assistant|>
SELECT "d_o_b" FROM "player_roster" WHERE "surname"='maat';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: How many bats does Todd have?
<|assistant|>
SELECT "bats" FROM "player_roster" WHERE "first"='todd';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which Position has a DOB of 13 may 1987?
<|assistant|>
SELECT "position" FROM "player_roster" WHERE "d_o_b"='13 may 1987';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which Bats have Throws of r, and a DOB of 22 may 1973?
<|assistant|>
SELECT "bats" FROM "player_roster" WHERE "throws"='r' AND "d_o_b"='22 may 1973';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"149" real,
"9_february" text,
"friendly" text,
"israel" text,
"croatia" text
);
Question: Which Croatia has a Friendly of world cup 2006 qualifier, and a 149 of 152?
<|assistant|>
SELECT "croatia" FROM "2005" WHERE "friendly"='world cup 2006 qualifier' AND "149"=152;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"rank" text,
"film" text,
"director_s" text,
"producer_s" text,
"writer_s" text,
"production_company" text
);
Question: For which production company did Sam Mccarthy produce?
<|assistant|>
SELECT "production_company" FROM "2006" WHERE "producer_s"='sam mccarthy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"rank" text,
"film" text,
"director_s" text,
"producer_s" text,
"writer_s" text,
"production_company" text
);
Question: Who was the director that worked with Dana Dorian as the writer?
<|assistant|>
SELECT "director_s" FROM "2006" WHERE "writer_s"='dana dorian';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006" (
"rank" text,
"film" text,
"director_s" text,
"producer_s" text,
"writer_s" text,
"production_company" text
);
Question: Which film, directed by Dana Dorian, was nominated?
<|assistant|>
SELECT "film" FROM "2006" WHERE "rank"='nominated' AND "director_s"='dana dorian';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text
);
Question: What is the sum for December against the vancouver canucks earlier than game 33?
<|assistant|>
SELECT SUM("december") FROM "schedule_and_results" WHERE "opponent"='vancouver canucks' AND "game"<33;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule_and_results" (
"game" real,
"december" real,
"opponent" text,
"score" text,
"record" text
);
Question: What is the sum for December when the record was 22-12-5?
<|assistant|>
SELECT SUM("december") FROM "schedule_and_results" WHERE "record"='22-12-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: When is the earliest year associated with team norton and 0 wins?
<|assistant|>
SELECT MIN("year") FROM "motorcycle_grand_prix_results" WHERE "team"='norton' AND "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,
"wins" real
);
Question: What is the year that there were 0 wins, team AJS, and under 12 points?
<|assistant|>
SELECT COUNT("year") FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "team"='ajs' AND "points"<12;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "awards_and_nominations" (
"year" real,
"award_ceremony" text,
"category" text,
"nominee" text,
"result" text
);
Question: What year is associated with a drama desk award ceremony and a Category of outstanding featured actress in a musical?
<|assistant|>
SELECT AVG("year") FROM "awards_and_nominations" WHERE "award_ceremony"='drama desk award' AND "category"='outstanding featured actress in a musical';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rushing" (
"name" text,
"gp_gs" text,
"gain" real,
"loss" real,
"long" real,
"avg_g" text
);
Question: What is the average Loss for the long of more than 12 with a name of opponents with a Gain larger than 1751?
<|assistant|>
SELECT AVG("loss") FROM "rushing" WHERE "long">12 AND "name"='opponents' AND "gain">1751;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_02_season_as_a_three_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"time" text,
"jockey" text,
"winner_2nd" text
);
Question: Who was the winner/2nd place finisher in the Caulfield Guineas?
<|assistant|>
SELECT "winner_2nd" FROM "2001_02_season_as_a_three_year_old" WHERE "race"='caulfield guineas';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_02_season_as_a_three_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"time" text,
"jockey" text,
"winner_2nd" text
);
Question: Which jockey had a group of G3?
<|assistant|>
SELECT "jockey" FROM "2001_02_season_as_a_three_year_old" WHERE "group"='g3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2001_02_season_as_a_three_year_old" (
"result" text,
"date" text,
"race" text,
"venue" text,
"group" text,
"distance" text,
"weight_kg" real,
"time" text,
"jockey" text,
"winner_2nd" text
);
Question: What was the time for the G2 group at the Hobartville Stakes?
<|assistant|>
SELECT "time" FROM "2001_02_season_as_a_three_year_old" WHERE "group"='g2' AND "race"='hobartville stakes';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: Which airport has perth as the city?
<|assistant|>
SELECT "airport" FROM "destinations" WHERE "city"='perth';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: Which city has tasmania as the state/territory and a ICAO of ymhb?
<|assistant|>
SELECT "city" FROM "destinations" WHERE "state_territory"='tasmania' AND "icao"='ymhb';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: Which airport has an ICAO of ybcg?
<|assistant|>
SELECT "airport" FROM "destinations" WHERE "icao"='ybcg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: What is the IATA that has new south wales as the state/territory beginning on july 2009?
<|assistant|>
SELECT "iata" FROM "destinations" WHERE "state_territory"='new south wales' AND "begin"='july 2009';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: What IATA has queensland as the state/territory and an ICAO of ybrk?
<|assistant|>
SELECT "iata" FROM "destinations" WHERE "state_territory"='queensland' AND "icao"='ybrk';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"state_territory" text,
"iata" text,
"icao" text,
"airport" text,
"begin" text
);
Question: What begin has victoria as the state/territory and a ICA0 of ymml?
<|assistant|>
SELECT "begin" FROM "destinations" WHERE "state_territory"='victoria' AND "icao"='ymml';<|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: Who was the visitor on March 27?
<|assistant|>
SELECT "visitor" FROM "march" WHERE "date"='march 27';<|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 record on March 14?
<|assistant|>
SELECT "record" FROM "march" WHERE "date"='march 14';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_stations" (
"frequency" text,
"name" text,
"format" text,
"call_sign" text,
"covered_location" text
);
Question: What format is at frequency 99.5 FM?
<|assistant|>
SELECT "format" FROM "fm_stations" WHERE "frequency"='99.5 fm';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_stations" (
"frequency" text,
"name" text,
"format" text,
"call_sign" text,
"covered_location" text
);
Question: What format has the call sign DZFE?
<|assistant|>
SELECT "format" FROM "fm_stations" WHERE "call_sign"='dzfe';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_stations" (
"frequency" text,
"name" text,
"format" text,
"call_sign" text,
"covered_location" text
);
Question: What covered location has a frequency of 90.7 FM
<|assistant|>
SELECT "covered_location" FROM "fm_stations" WHERE "frequency"='90.7 fm';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_stations" (
"frequency" text,
"name" text,
"format" text,
"call_sign" text,
"covered_location" text
);
Question: What is the frequency of 104.3 business radio?
<|assistant|>
SELECT "frequency" FROM "fm_stations" WHERE "name"='104.3 business radio';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fm_stations" (
"frequency" text,
"name" text,
"format" text,
"call_sign" text,
"covered_location" text
);
Question: What name has the call sign DWYS?
<|assistant|>
SELECT "name" FROM "fm_stations" WHERE "call_sign"='dwys';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "villages" (
"name" text,
"faith" text,
"type" text,
"intake" real,
"dcsf_number" real,
"ofsted_number" real
);
Question: Who has a DCSF number of 3373?
<|assistant|>
SELECT "name" FROM "villages" WHERE "dcsf_number"=3373;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "villages" (
"name" text,
"faith" text,
"type" text,
"intake" real,
"dcsf_number" real,
"ofsted_number" real
);
Question: What is the average primary intake with an Ofsted number of 117433 and a DCSF number greater than 3335?
<|assistant|>
SELECT AVG("intake") FROM "villages" WHERE "type"='primary' AND "ofsted_number"=117433 AND "dcsf_number">3335;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "villages" (
"name" text,
"faith" text,
"type" text,
"intake" real,
"dcsf_number" real,
"ofsted_number" real
);
Question: What is the lowest Ofsted number for a primary with a CE faith, intake of 30 and a DCSF number lower than 3349?
<|assistant|>
SELECT MIN("ofsted_number") FROM "villages" WHERE "type"='primary' AND "faith"='ce' AND "intake"=30 AND "dcsf_number"<3349;<|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,
"venue" text,
"attendance" real
);
Question: Can you tell me the Opponent that has the Result of w 37-14?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "result"='w 37-14';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"venue" text,
"attendance" real
);
Question: Can you tell me the Opponent that has the Date of october 11, 1953?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "date"='october 11, 1953';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"league" text,
"venue" text,
"established" real,
"championships" real
);
Question: What year was the West Coast League established than the championships are greater than 0?
<|assistant|>
SELECT "established" FROM "professional_sports" WHERE "championships">0 AND "league"='west coast league';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"league" text,
"venue" text,
"established" real,
"championships" real
);
Question: During the Apple Bowl having 0 championships, what was the established year?
<|assistant|>
SELECT MAX("established") FROM "professional_sports" WHERE "championships"=0 AND "venue"='apple bowl';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"league" text,
"venue" text,
"established" real,
"championships" real
);
Question: What sport happened at Wildcat Stadium?
<|assistant|>
SELECT "sport" FROM "professional_sports" WHERE "venue"='wildcat stadium';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "professional_sports" (
"club" text,
"sport" text,
"league" text,
"venue" text,
"established" real,
"championships" real
);
Question: How many championships does Evergreen Premier League have?
<|assistant|>
SELECT MAX("championships") FROM "professional_sports" WHERE "league"='evergreen premier league';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Which Position has a Round larger than 10, and a Name of shawn mccarthy?
<|assistant|>
SELECT "position" FROM "atlanta_falcons_draft_history" WHERE "round">10 AND "name"='shawn mccarthy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: How many Pick #s have a Name of tory epps, and a Round larger than 8?
<|assistant|>
SELECT COUNT("pick_num") FROM "atlanta_falcons_draft_history" WHERE "name"='tory epps' AND "round">8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"attendance" real
);
Question: Which team was the visitor with a record of 5-2-0?
<|assistant|>
SELECT "visitor" FROM "schedule" WHERE "record"='5-2-0';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text,
"attendance" real
);
Question: What is the score for the November 3 game?
<|assistant|>
SELECT "score" FROM "schedule" WHERE "date"='november 3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"martin" text,
"gr_ne" text,
"others" text,
"undecided" text
);
Question: What percent of others did ogm/news count when MARTIN had 9%?
<|assistant|>
SELECT "others" FROM "opinion_polls" WHERE "martin"='9%' AND "source"='ogm/news';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"martin" text,
"gr_ne" text,
"others" text,
"undecided" text
);
Question: What is the Undecided the others was 4%?
<|assistant|>
SELECT "undecided" FROM "opinion_polls" WHERE "others"='4%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"martin" text,
"gr_ne" text,
"others" text,
"undecided" text
);
Question: What is the Undecided on 2009-05-24?
<|assistant|>
SELECT "undecided" FROM "opinion_polls" WHERE "date"='2009-05-24';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"martin" text,
"gr_ne" text,
"others" text,
"undecided" text
);
Question: What is the Date that has MARTIN of 7–9% and no Undecided?
<|assistant|>
SELECT "date" FROM "opinion_polls" WHERE "undecided"='–' AND "martin"='7–9%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "opinion_polls" (
"source" text,
"date" text,
"martin" text,
"gr_ne" text,
"others" text,
"undecided" text
);
Question: What is the Date when MARTIN had 8%?
<|assistant|>
SELECT "date" FROM "opinion_polls" WHERE "martin"='8%';<|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 Attendance has a Game smaller than 3, and a Date of october 31?
<|assistant|>
SELECT COUNT("attendance") FROM "summary" WHERE "game"<3 AND "date"='october 31';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "best_figures_in_a_match" (
"rank" text,
"bowling" text,
"player" text,
"opponent" text,
"venue" text,
"season" text
);
Question: What is rank of player Charles Eady and a Bowling of 12/63?
<|assistant|>
SELECT "rank" FROM "best_figures_in_a_match" WHERE "player"='charles eady' AND "bowling"='12/63';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_37_17_20" (
"outcome" text,
"date" text,
"surface" text,
"partnering" text,
"opponent" text,
"score" text
);
Question: Who was the Opponent partnering with Jordan Kerr, on a hard surface that was the winner?
<|assistant|>
SELECT "opponent" FROM "doubles_37_17_20" WHERE "surface"='hard' AND "outcome"='winner' AND "partnering"='jordan kerr';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "engines" (
"year" real,
"trim" text,
"engine" text,
"power" text,
"torque" text,
"epa_2008_city" text
);
Question: What's the Year Average that has a Power of BHP (KW) and Trim of LS/2LT?
<|assistant|>
SELECT AVG("year") FROM "engines" WHERE "power"='bhp (kw)' AND "trim"='ls/2lt';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "engines" (
"year" real,
"trim" text,
"engine" text,
"power" text,
"torque" text,
"epa_2008_city" text
);
Question: Which Engine has a Year that's Larger than 2006 and Power of BHP (KW)?
<|assistant|>
SELECT "engine" FROM "engines" WHERE "year">2006 AND "power"='bhp (kw)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "engines" (
"year" real,
"trim" text,
"engine" text,
"power" text,
"torque" text,
"epa_2008_city" text
);
Question: What Torque has a Power of HP (KW)?
<|assistant|>
SELECT "torque" FROM "engines" WHERE "power"='hp (kw)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "engines" (
"year" real,
"trim" text,
"engine" text,
"power" text,
"torque" text,
"epa_2008_city" text
);
Question: What's the Year average that's got Trim of LS/LT and Power of HP (KW)?
<|assistant|>
SELECT AVG("year") FROM "engines" WHERE "trim"='ls/lt' AND "power"='hp (kw)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Name the college with overall of 17
<|assistant|>
SELECT "college" FROM "atlanta_falcons_draft_history" WHERE "overall"=17;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "atlanta_falcons_draft_history" (
"round" real,
"pick_num" real,
"overall" real,
"name" text,
"position" text,
"college" text
);
Question: Name the least overall for tony baker
<|assistant|>
SELECT MIN("overall") FROM "atlanta_falcons_draft_history" WHERE "name"='tony baker';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: Who was the visiting team when Winnipeg was the home team?
<|assistant|>
SELECT "visitor" FROM "regular_season" WHERE "home"='winnipeg';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: What was the score of the game with a decision of Peeters and a record of 29–3–11?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "decision"='peeters' AND "record"='29–3–11';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue_num" text
);
Question: What is the Label of Catalogue # HVNLP26CD from United Kingdom?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "country"='united kingdom' AND "catalogue_num"='hvnlp26cd';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue_num" text
);
Question: What Country is Catalogue # ASW 50248 (724385024825) from?
<|assistant|>
SELECT "country" FROM "release_history" WHERE "catalogue_num"='asw 50248 (724385024825)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "races" (
"round" text,
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_car" text,
"winning_team" text,
"report" text
);
Question: Who is the winning team of the South Pacific Trophy?
<|assistant|>
SELECT "winning_team" FROM "races" WHERE "name"='south pacific trophy';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Loss of gonzález (0–3) had what attendance?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "loss"='gonzález (0–3)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Record of 92–70 had what date?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='92–70';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Loss of kendrick (11–8) had what record?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "loss"='kendrick (11–8)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Date of september 28 had what record?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='september 28';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Attendance of 23,150 had what opponent?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "attendance"='23,150';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: Attendance of 36,796 had what score?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "attendance"='36,796';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rushing" (
"name" text,
"gp_gs" text,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
Question: What is the sum of Long for derrick locke?
<|assistant|>
SELECT SUM("long") FROM "rushing" WHERE "name"='derrick locke';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rushing" (
"name" text,
"gp_gs" text,
"gain" real,
"loss" real,
"long" real,
"avg_g" real
);
Question: What is the lowest Loss with Gain larger than 319 for derrick locke?
<|assistant|>
SELECT MIN("loss") FROM "rushing" WHERE "name"='derrick locke' AND "gain">319;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview" (
"club" text,
"sport" text,
"founded" real,
"league" text,
"venue" text,
"head_coach" text
);
Question: Head Coach of wojciech kamiński is what club?
<|assistant|>
SELECT "club" FROM "overview" WHERE "head_coach"='wojciech kamiński';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview" (
"club" text,
"sport" text,
"founded" real,
"league" text,
"venue" text,
"head_coach" text
);
Question: Sport of football, and a Venue of stadion polonii is what league?
<|assistant|>
SELECT "league" FROM "overview" WHERE "sport"='football' AND "venue"='stadion polonii';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview" (
"club" text,
"sport" text,
"founded" real,
"league" text,
"venue" text,
"head_coach" text
);
Question: Sport of gaelic football and hurling is what league?
<|assistant|>
SELECT "league" FROM "overview" WHERE "sport"='gaelic football and hurling';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview" (
"club" text,
"sport" text,
"founded" real,
"league" text,
"venue" text,
"head_coach" text
);
Question: Venue of Pepsi arena involved what club?
<|assistant|>
SELECT "club" FROM "overview" WHERE "venue"='pepsi arena';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the highest earnings for Tom watson who had a ranking larger than 2?
<|assistant|>
SELECT MAX("earnings") FROM "leaders" WHERE "player"='tom watson' AND "rank">2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the highest rank for the player who earns $4,263,133?
<|assistant|>
SELECT MAX("rank") FROM "leaders" WHERE "earnings"='4,263,133';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the average number of wins for the player with a rank larger than 3 and earnings of $3,707,586?
<|assistant|>
SELECT AVG("wins") FROM "leaders" WHERE "rank">3 AND "earnings"='3,707,586';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the highest number of wins for Tom Watson who earns less than $4,974,845?
<|assistant|>
SELECT MAX("wins") FROM "leaders" WHERE "player"='tom watson' AND "earnings"<'4,974,845';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "leaders" (
"rank" real,
"player" text,
"country" text,
"earnings" real,
"wins" real
);
Question: What is the highest earnings for curtis strange?
<|assistant|>
SELECT MAX("earnings") FROM "leaders" WHERE "player"='curtis strange';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nascar_nationwide_series" (
"year" real,
"starts" real,
"wins" real,
"top_5" real,
"top_10" real,
"poles" real,
"avg_start" real,
"avg_finish" real,
"winnings" text,
"position" text
);
Question: What is the average year with an average start smaller than 6.3 and fewer than 0 wins?
<|assistant|>
SELECT AVG("year") FROM "nascar_nationwide_series" WHERE "avg_start"<6.3 AND "wins"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: Which Second has a Skip of barbora vojtusova?
<|assistant|>
SELECT "second" FROM "group_b2" WHERE "skip"='barbora vojtusova';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: Which Skip did marju velga lead?
<|assistant|>
SELECT "skip" FROM "group_b2" WHERE "lead"='marju velga';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: Which Lead has a Second of katrin kuusk?
<|assistant|>
SELECT "lead" FROM "group_b2" WHERE "second"='katrin kuusk';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: Which Third has a Skip of ellen vogt?
<|assistant|>
SELECT "third" FROM "group_b2" WHERE "skip"='ellen vogt';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: Which Third has a Second of agnieszka ogrodniczek?
<|assistant|>
SELECT "third" FROM "group_b2" WHERE "second"='agnieszka ogrodniczek';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "group_b2" (
"nation" text,
"skip" text,
"third" text,
"second" text,
"lead" text
);
Question: What is Spain's skip?
<|assistant|>
SELECT "skip" FROM "group_b2" WHERE "nation"='spain';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "vermont_counties_ranked_by_per_capita_in" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
Question: What is the Per capita income associated with over 116,716,292 households and a Median household income of $42,706?
<|assistant|>
SELECT "per_capita_income" FROM "vermont_counties_ranked_by_per_capita_in" WHERE "number_of_households">'116,716,292' AND "median_household_income"='$42,706';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "vermont_counties_ranked_by_per_capita_in" (
"county" text,
"per_capita_income" text,
"median_household_income" text,
"median_family_income" text,
"population" real,
"number_of_households" real
);
Question: What is the Per capita income associated with a Median household income of $55,800?
<|assistant|>
SELECT "per_capita_income" FROM "vermont_counties_ranked_by_per_capita_in" WHERE "median_household_income"='$55,800';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.