text
stringlengths 310
1.28k
|
|---|
<|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" real,
"record" text
);
Question: What was the loss of the game against the Indians when the record was 15-15?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "opponent"='indians' AND "record"='15-15';<|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" real,
"record" text
);
Question: What is the total attendance for games when the record was 23-23?
<|assistant|>
SELECT COUNT("attendance") FROM "game_log" WHERE "record"='23-23';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "seasons_since_1970" (
"division" text,
"drawn" real,
"lost" real,
"points" real,
"league_pos" text
);
Question: What is the total number of points for the conference division, a league position of 9th, and a lost result less than 13?
<|assistant|>
SELECT COUNT("points") FROM "seasons_since_1970" WHERE "division"='conference' AND "league_pos"='9th' AND "lost"<13;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "seasons_since_1970" (
"division" text,
"drawn" real,
"lost" real,
"points" real,
"league_pos" text
);
Question: What is the drawn result with a league position of 15th and a lost result that is more than 17?
<|assistant|>
SELECT SUM("drawn") FROM "seasons_since_1970" WHERE "league_pos"='15th' AND "lost">17;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
Question: Name the 2014 which has a 2003-04 of did not participate and a 2005 of did not participate
<|assistant|>
SELECT "2014" FROM "competition_timeline" WHERE "2003_04"='did not participate' AND "2005"='did not participate';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
Question: Name the competition of 2010 of dnp
<|assistant|>
SELECT "competition" FROM "competition_timeline" WHERE "2010"='dnp';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
Question: Name the 1999-2000 for 1993-94 of did not participate
<|assistant|>
SELECT "1999_2000" FROM "competition_timeline" WHERE "1993_94"='did not participate';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
Question: Name the 2005 when 2001-02 is sf
<|assistant|>
SELECT "2005" FROM "competition_timeline" WHERE "2001_02"='sf';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "competition_timeline" (
"competition" text,
"1993_94" text,
"1994_95" text,
"1995_96" text,
"1996_97" text,
"1997_98" text,
"1998_99" text,
"1999_2000" text,
"2000_01" text,
"2001_02" text,
"2002_03" text,
"2003_04" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"2014" text
);
Question: Name the 2012 which has 2000-01 of 1st
<|assistant|>
SELECT "2012" FROM "competition_timeline" WHERE "2000_01"='1st';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: Name the score for columbus visitor
<|assistant|>
SELECT "score" FROM "november" WHERE "visitor"='columbus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
Question: Name the least attendance with visitor of edmonton
<|assistant|>
SELECT MIN("attendance") FROM "november" WHERE "visitor"='edmonton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is the lowest numbered lane of Sue Rolph with a rank under 5?
<|assistant|>
SELECT MIN("lane") FROM "semifinal_1" WHERE "name"='sue rolph' AND "rank"<5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is the lane number of the swimmer with a time of 55.69?
<|assistant|>
SELECT "lane" FROM "semifinal_1" WHERE "time"=55.69;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
Question: What is the lowest number of league cups with 4 championships?
<|assistant|>
SELECT MIN("league_cup") FROM "goalscorers" WHERE "championship"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
Question: What is the highest value for FA cups, that has a total of 0 4, with less than 4 championships?
<|assistant|>
SELECT MAX("fa_cup") FROM "goalscorers" WHERE "total"='0 4' AND "championship"<4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goalscorers" (
"name" text,
"championship" real,
"league_cup" real,
"fa_cup" real,
"total" text
);
Question: How many FA cups were there without any league cups, but a total of 0 2?
<|assistant|>
SELECT MIN("fa_cup") FROM "goalscorers" WHERE "total"='0 2' AND "league_cup"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: Who is Pick #41?
<|assistant|>
SELECT "player" FROM "round_three" WHERE "pick_num"='41';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: Which player was Pick #40?
<|assistant|>
SELECT "player" FROM "round_three" WHERE "pick_num"='40';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: Which team picked Dave Bonter?
<|assistant|>
SELECT "nhl_team" FROM "round_three" WHERE "player"='dave bonter';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_three" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: Which team picked the player from the Toronto Marlboros (OHA) as Pick #32?
<|assistant|>
SELECT "nhl_team" FROM "round_three" WHERE "college_junior_club_team"='toronto marlboros (oha)' AND "pick_num"='32';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"season" text,
"league" text,
"rank" real,
"games" real,
"points" real,
"manager" text,
"top_scorer" text,
"goals" real
);
Question: Name the most games for eredivisie when jurrie koolhof is manager when goals are less than 10
<|assistant|>
SELECT MAX("games") FROM "results" WHERE "league"='eredivisie' AND "manager"='jurrie koolhof' AND "goals"<10;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"season" text,
"league" text,
"rank" real,
"games" real,
"points" real,
"manager" text,
"top_scorer" text,
"goals" real
);
Question: Name the least rank when games are more than 34 and the season is 2009-10
<|assistant|>
SELECT MIN("rank") FROM "results" WHERE "games">34 AND "season"='2009-10';<|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: Name the least point for mv agusta and rank of 13th for wins less than 0
<|assistant|>
SELECT MIN("points") FROM "motorcycle_grand_prix_results" WHERE "team"='mv agusta' AND "rank"='13th' 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,
"rank" text,
"wins" real
);
Question: Name the rank for wins of 0 and points of 2
<|assistant|>
SELECT "rank" FROM "motorcycle_grand_prix_results" WHERE "wins"=0 AND "points"=2;<|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: Name the total number of points with year less than 1955 and rank of 5th with wins less than 0
<|assistant|>
SELECT COUNT("points") FROM "motorcycle_grand_prix_results" WHERE "year"<1955 AND "rank"='5th' AND "wins"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_taranaki_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What is the total decile in the area of Normanby with a roller smaller than 157?
<|assistant|>
SELECT SUM("decile") FROM "south_taranaki_district" WHERE "area"='normanby' AND "roll"<157;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_taranaki_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" real,
"roll" real
);
Question: What Authority has a decile greater than 5, with a roll of 170?
<|assistant|>
SELECT "authority" FROM "south_taranaki_district" WHERE "decile">5 AND "roll"=170;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
Question: What is the average goals against average for those playing more than 78 games?
<|assistant|>
SELECT AVG("goals_against_average") FROM "goaltending_leaders" WHERE "games_played">78;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
Question: Who played over 46 games and allowed less than 195 goals?
<|assistant|>
SELECT "player" FROM "goaltending_leaders" WHERE "games_played">46 AND "goals_allowed"<195;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "goaltending_leaders" (
"player" text,
"years" text,
"games_played" real,
"goals_allowed" real,
"goals_against_average" real
);
Question: Who played 44 games who averaged over 2.07 goals against?
<|assistant|>
SELECT "player" FROM "goaltending_leaders" WHERE "goals_against_average">2.07 AND "games_played"=44;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
Question: Name how ashtagrama lyers say it for engal veetil, engal agathil
<|assistant|>
SELECT "how_ashtagrama_iyers_say_it" FROM "language" WHERE "pure_tamil"='engal veetil, engal agathil';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
Question: Name the english meaning for engey poringo
<|assistant|>
SELECT "english_meaning" FROM "language" WHERE "how_other_tamils_say_it"='engey poringo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
Question: Name how other lyers say enga ullale
<|assistant|>
SELECT "how_other_iyers_say_it" FROM "language" WHERE "how_ashtagrama_iyers_say_it"='enga ullale';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "language" (
"pure_tamil" text,
"how_ashtagrama_iyers_say_it" text,
"how_other_iyers_say_it" text,
"how_other_tamils_say_it" text,
"english_meaning" text
);
Question: Name the pure tamil for enga athilae
<|assistant|>
SELECT "pure_tamil" FROM "language" WHERE "how_other_iyers_say_it"='enga athilae';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_largest_ferries_of_europe" (
"ship" text,
"length" text,
"passengers" real,
"speed" text,
"built" real,
"company" text,
"registry" text
);
Question: What company built the ship named excellent in 1998?
<|assistant|>
SELECT "company" FROM "the_largest_ferries_of_europe" WHERE "built"=1998 AND "ship"='excellent';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_largest_ferries_of_europe" (
"ship" text,
"length" text,
"passengers" real,
"speed" text,
"built" real,
"company" text,
"registry" text
);
Question: What's the total built by the United Kingdom and holds 1,300 passengers?
<|assistant|>
SELECT COUNT("built") FROM "the_largest_ferries_of_europe" WHERE "registry"='united kingdom' AND "passengers"='1,300';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the visiting team for stadium of ralph wilson stadium
<|assistant|>
SELECT "visiting_team" FROM "2005" WHERE "stadium"='ralph wilson stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the date for visiting team of denver broncos
<|assistant|>
SELECT "date" FROM "2005" WHERE "visiting_team"='denver broncos';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the stadium with host team of san diego chargers and final score of 23-45
<|assistant|>
SELECT "stadium" FROM "2005" WHERE "host_team"='san diego chargers' AND "final_score"='23-45';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the stadium with final score of 20-10
<|assistant|>
SELECT "stadium" FROM "2005" WHERE "final_score"='20-10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the date with visiting team of philadelphia eagles
<|assistant|>
SELECT "date" FROM "2005" WHERE "visiting_team"='philadelphia eagles';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Name the host team for january 1 (2006)
<|assistant|>
SELECT "host_team" FROM "2005" WHERE "date"='january 1 (2006)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
Question: What team belongs to Delmar?
<|assistant|>
SELECT "team" FROM "2008_regular_season_football_standings" WHERE "school"='delmar';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
Question: What was Laurel's division record?
<|assistant|>
SELECT "division_record" FROM "2008_regular_season_football_standings" WHERE "school"='laurel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
Question: What is the rank of airport with a (IATA/ICAO) of bcm/lrbc code and an amount of 240,735 in 2010?
<|assistant|>
SELECT MIN("rank") FROM "passenger_statistics" WHERE "code_iata_icao"='bcm/lrbc' AND "2010">'240,735';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
Question: What is the average for the year 2008 of the team that in 2010 had an average of 240,735 with rank lower than 5?
<|assistant|>
SELECT AVG("2008") FROM "passenger_statistics" WHERE "2010"='240,735' AND "rank"<5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "passenger_statistics" (
"rank" real,
"airport" text,
"city" text,
"code_iata_icao" text,
"2008" real,
"2009" real,
"2010" real
);
Question: What is the average in 2010 of the team with a code of (IATA/ICAO) or cra/lrcv?
<|assistant|>
SELECT "2010" FROM "passenger_statistics" WHERE "code_iata_icao"='cra/lrcv';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
Question: Which state has 67% Republicans and a ratio of 24/12 of Republicans to Democrats?
<|assistant|>
SELECT "state_ranked_in_partisan_order" FROM "partisan_mix_of_the_house_by_state" WHERE "percentage_republicans"='67%' AND "republican_democratic"='24/12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
Question: What state is 25% Democrats has a ratio of 6/2 of Republicans to Democrats?
<|assistant|>
SELECT "state_ranked_in_partisan_order" FROM "partisan_mix_of_the_house_by_state" WHERE "percentage_democrats"='25%' AND "republican_democratic"='6/2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
Question: What is the ratio of Republicans to Democrats in South Carolina?
<|assistant|>
SELECT "republican_democratic" FROM "partisan_mix_of_the_house_by_state" WHERE "state_ranked_in_partisan_order"='south carolina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
Question: What is the Republican seat plurality of the state with a ratio of 12/4 Republicans to Democrats?
<|assistant|>
SELECT "republican_seat_plurality" FROM "partisan_mix_of_the_house_by_state" WHERE "republican_democratic"='12/4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "partisan_mix_of_the_house_by_state" (
"state_ranked_in_partisan_order" text,
"percentage_republicans" text,
"percentage_democrats" text,
"republican_democratic" text,
"republican_seat_plurality" text
);
Question: What is the Republican seat plurality of North Carolina?
<|assistant|>
SELECT "republican_seat_plurality" FROM "partisan_mix_of_the_house_by_state" WHERE "state_ranked_in_partisan_order"='north carolina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
Question: What is the highest score in round 4 and total of 284 in a year more recent than 1998?
<|assistant|>
SELECT MAX("round_4") FROM "tournaments" WHERE "score"=284 AND "year">1998;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
Question: What is the maximum ï¿¥ for a round 2 score of 65 and a round 4 score smaller than 67?
<|assistant|>
SELECT MAX("money") FROM "tournaments" WHERE "round_2"=65 AND "round_4"<67;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
Question: What is the earliest year when the Dunlop Phoenix Tournament was played with a round 4 score larger than 72?
<|assistant|>
SELECT MIN("year") FROM "tournaments" WHERE "tournament"='dunlop phoenix tournament' AND "round_4">72;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tournaments" (
"year" real,
"tournament" text,
"round_1" real,
"round_2" real,
"round_3" real,
"round_4" real,
"score" real,
"to_par" text,
"place" text,
"money" real
);
Question: What is the lowest round with a place of t15 in a year earlier than 1998?
<|assistant|>
SELECT MIN("round_1") FROM "tournaments" WHERE "place"='t15' AND "year"<1998;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
Question: Where was the BRDC International Trophy with driver Emerson Fittipaldi held?
<|assistant|>
SELECT "venue" FROM "non_championship_results" WHERE "driver"='emerson fittipaldi' AND "event"='brdc international trophy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
Question: What was the most recent race at Kyalami with Keke Rosberg competing?
<|assistant|>
SELECT MAX("year") FROM "non_championship_results" WHERE "venue"='kyalami' AND "driver"='keke rosberg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
Question: What year was the Spanish Grand Prix where Emerson Fittipaldi drove?
<|assistant|>
SELECT "year" FROM "non_championship_results" WHERE "event"='spanish grand prix' AND "driver"='emerson fittipaldi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
Question: What was the outcome for Emerson Fittipaldi in the race held at Jarama?
<|assistant|>
SELECT "result" FROM "non_championship_results" WHERE "venue"='jarama' AND "driver"='emerson fittipaldi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_results" (
"year" real,
"event" text,
"venue" text,
"driver" text,
"result" text
);
Question: How many years did Wilson Fittipaldi race?
<|assistant|>
SELECT COUNT("year") FROM "non_championship_results" WHERE "driver"='wilson fittipaldi';<|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,
"record" text
);
Question: What was the score of the game that had a loss of Cox (6–2)?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "loss"='cox (6–2)';<|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,
"record" text
);
Question: What was the date of the game that had a loss of Rojas (9–8)?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "loss"='rojas (9–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,
"record" text
);
Question: What was the score of the game that had a loss of Coates (0–2)?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "loss"='coates (0–2)';<|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,
"record" text
);
Question: What was the score of the game when the record was 58–47?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='58–47';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
Question: Strong's Transliteration of yowyaqiym is what Hebrew word?
<|assistant|>
SELECT "hebrew_word" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "strong_s_transliteration"='yowyaqiym';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
Question: How do you spell the Hebrew word יְהוֹשָפָט in English?
<|assistant|>
SELECT "english_spelling" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "hebrew_word"='יְהוֹשָפָט';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_of_theophoric_names_with_yeho_and_" (
"strong_s_num" real,
"hebrew_word" text,
"strong_s_transliteration" text,
"strong_s_words_compounded" text,
"english_spelling" text
);
Question: What's the english word joshaphat in Strong's Transliteration?
<|assistant|>
SELECT "strong_s_transliteration" FROM "table_of_theophoric_names_with_yeho_and_" WHERE "english_spelling"='joshaphat';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Which start has 1956 as the year?
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "year"='1956';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Which start has 32 as the finish and laps more than 6?
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "finish"='32' AND "laps">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Which start has 4 as a rank?
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "rank"='4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: How many laps have 1 as the start?
<|assistant|>
SELECT COUNT("laps") FROM "indy_500_results" WHERE "start"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Which finish has 33 as a rank and 200 for laps?
<|assistant|>
SELECT "finish" FROM "indy_500_results" WHERE "rank"='33' AND "laps"=200;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" text,
"start" text,
"qual" text,
"rank" text,
"finish" text,
"laps" real
);
Question: Which finish has 1 as the rank?
<|assistant|>
SELECT "finish" FROM "indy_500_results" WHERE "rank"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
Question: What are the special notes for an issue price under 24.95 with an edmonton oilers theme?
<|assistant|>
SELECT "special_notes" FROM "one_dollar" WHERE "issue_price"<24.95 AND "theme"='edmonton oilers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
Question: What theme has special notes from calgary flames gift set?
<|assistant|>
SELECT "theme" FROM "one_dollar" WHERE "special_notes"='from calgary flames gift set';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "one_dollar" (
"year" real,
"theme" text,
"artist" text,
"issue_price" real,
"special_notes" text
);
Question: What year has an issue price over 15.95, and a special notes from edmonton oilers gift set?
<|assistant|>
SELECT COUNT("year") FROM "one_dollar" WHERE "issue_price">15.95 AND "special_notes"='from edmonton oilers gift set';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
Question: What is the site when the superintendent was John Barry?
<|assistant|>
SELECT "site" FROM "construction" WHERE "superintendent"='john barry';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
Question: What is the number of guns when the superintendent was Silas Talbot?
<|assistant|>
SELECT "guns" FROM "construction" WHERE "superintendent"='silas talbot';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "construction" (
"ship" text,
"site" text,
"guns" real,
"naval_constructor" text,
"superintendent" text
);
Question: What is the site when the superintendent was James Sever?
<|assistant|>
SELECT "site" FROM "construction" WHERE "superintendent"='james sever';<|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" real,
"record" text
);
Question: Who was the loss in the game with the record of 65-53?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='65-53';<|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" real,
"record" text
);
Question: On August 29, What was the record playing against the Rangers?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "opponent"='rangers' AND "date"='august 29';<|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" real,
"record" text
);
Question: On August 22, how many people came to the game?
<|assistant|>
SELECT "attendance" FROM "game_log" WHERE "date"='august 22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "totals_up_to_and_including_the_5th_test_" (
"series" text,
"season" text,
"host" text,
"tests" real,
"england" real,
"west_indies" real,
"draw" real,
"series_result" text,
"holder_at_the_end_of_the_series" text
);
Question: When west indes was a holder at the end of the series for the 1991 season with an england greater than 1, what is the smallest west indies?
<|assistant|>
SELECT MIN("west_indies") FROM "totals_up_to_and_including_the_5th_test_" WHERE "holder_at_the_end_of_the_series"='west indies' AND "england">1 AND "season"='1991';<|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" real,
"record" text
);
Question: When were the Brewers 27-31?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='27-31';<|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" real,
"record" text
);
Question: When did the Brewers lose 2-8?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "score"='2-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" real,
"record" text
);
Question: When the Brewers score was 5-7, what was the lowest attendance?
<|assistant|>
SELECT MIN("attendance") FROM "game_log" WHERE "score"='5-7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: Who hosted the visiting team Baltimore Ravens?
<|assistant|>
SELECT "host_team" FROM "2006_season" WHERE "visiting_team"='baltimore ravens';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: What was the final score at Heinz Field?
<|assistant|>
SELECT "final_score" FROM "2006_season" WHERE "stadium"='heinz field';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: What is the home stadium of the Atlanta Falcons?
<|assistant|>
SELECT "stadium" FROM "2006_season" WHERE "host_team"='atlanta falcons';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_season" (
"date" text,
"visiting_team" text,
"final_score" text,
"host_team" text,
"stadium" text
);
Question: What date did the New York Giants play as a visiting team?
<|assistant|>
SELECT "date" FROM "2006_season" WHERE "visiting_team"='new york giants';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What is the score of Tim Herron, who placed t1?
<|assistant|>
SELECT "score" FROM "second_round" WHERE "place"='t1' AND "player"='tim herron';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What place does Fred Funk, who has a score of 69-69=138, have?
<|assistant|>
SELECT "place" FROM "second_round" WHERE "score"='69-69=138' AND "player"='fred funk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What is Tiger Woods's score?
<|assistant|>
SELECT "score" FROM "second_round" WHERE "player"='tiger woods';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What is the score of Australia?
<|assistant|>
SELECT "score" FROM "second_round" WHERE "country"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "moto_gp_participants" (
"team" text,
"constructor" text,
"motorcycle" text,
"tyre" text,
"rider" text,
"rounds" text
);
Question: Who was Constructor for rider Marco Melandri?
<|assistant|>
SELECT "constructor" FROM "moto_gp_participants" WHERE "rider"='marco melandri';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "moto_gp_participants" (
"team" text,
"constructor" text,
"motorcycle" text,
"tyre" text,
"rider" text,
"rounds" text
);
Question: Anthony West ride which Motorcyle?
<|assistant|>
SELECT "motorcycle" FROM "moto_gp_participants" WHERE "rider"='anthony west';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: What team draft a player from Canada that was picked #43 and plays right wing?
<|assistant|>
SELECT "nhl_team" FROM "round_four" WHERE "nationality"='canada' AND "position"='right wing' AND "pick_num"='43';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: What nationality is Gerry Methe?
<|assistant|>
SELECT "nationality" FROM "round_four" WHERE "player"='gerry methe';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_four" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: What which player from Canada was picked #49 and plays left wing?
<|assistant|>
SELECT "player" FROM "round_four" WHERE "nationality"='canada' AND "position"='left wing' AND "pick_num"='49';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.