text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "jersey_progress" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"team_classification" text
);
Question: Name the team classification for stage of 6
<|assistant|>
SELECT "team_classification" FROM "jersey_progress" WHERE "stage"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sonshine_radio_stations_in_the_philippin" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
Question: What is the Davao's power (kW)?
<|assistant|>
SELECT "power_k_w" FROM "sonshine_radio_stations_in_the_philippin" WHERE "location"='davao';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sonshine_radio_stations_in_the_philippin" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
Question: What is the brand of DXRE?
<|assistant|>
SELECT "branding" FROM "sonshine_radio_stations_in_the_philippin" WHERE "callsign"='dxre';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sonshine_radio_stations_in_the_philippin" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
Question: What is the power (kW) of Davao?
<|assistant|>
SELECT "power_k_w" FROM "sonshine_radio_stations_in_the_philippin" WHERE "location"='davao';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sonshine_radio_stations_in_the_philippin" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
Question: What is the callsign of Cagayan de Oro with 5kW?
<|assistant|>
SELECT "callsign" FROM "sonshine_radio_stations_in_the_philippin" WHERE "power_k_w"='5kw' AND "location"='cagayan de oro';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sonshine_radio_stations_in_the_philippin" (
"branding" text,
"callsign" text,
"frequency" text,
"power_k_w" text,
"location" text
);
Question: What is the callsign of the 5kW Sonshine Radio Cotabato?
<|assistant|>
SELECT "callsign" FROM "sonshine_radio_stations_in_the_philippin" WHERE "power_k_w"='5kw' AND "branding"='sonshine radio cotabato';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_batting_averages" (
"matches" real,
"innings" real,
"not_outs" real,
"runs" real,
"average" real
);
Question: What's the average amount of Runs that has 40 innings, and Not outs larger than 6?
<|assistant|>
SELECT AVG("runs") FROM "highest_batting_averages" WHERE "innings"=40 AND "not_outs">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "highest_batting_averages" (
"matches" real,
"innings" real,
"not_outs" real,
"runs" real,
"average" real
);
Question: What's the total Innings that has Runs of 1598, and Matches less than 41?
<|assistant|>
SELECT COUNT("innings") FROM "highest_batting_averages" WHERE "runs"=1598 AND "matches"<41;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"party" text,
"party_list_votes" real,
"vote_percentage" text,
"total_seats" real,
"seat_percentage" text
);
Question: What is the highest total number of seats with a Seat percentage of 46.5% and less than 394,118 party list votes?
<|assistant|>
SELECT MAX("total_seats") FROM "results" WHERE "seat_percentage"='46.5%' AND "party_list_votes"<'394,118';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"party" text,
"party_list_votes" real,
"vote_percentage" text,
"total_seats" real,
"seat_percentage" text
);
Question: What is the number of party list votes for a vote percentage of 2.6% with 0 total seats?
<|assistant|>
SELECT SUM("party_list_votes") FROM "results" WHERE "total_seats"=0 AND "vote_percentage"='2.6%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"event" text,
"notes" text
);
Question: What venue held the event in 2008 that has 2:13:10 in the notes?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "year"=2008 AND "notes"='2:13:10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "specimen_data" (
"name" text,
"discovered" real,
"museum" text,
"museum_city" text,
"discoverer" text,
"formation" text,
"location" text
);
Question: Who discovered the specimen at the Burpee Museum of Natural History?
<|assistant|>
SELECT "discoverer" FROM "specimen_data" WHERE "museum"='burpee museum of natural history';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "specimen_data" (
"name" text,
"discovered" real,
"museum" text,
"museum_city" text,
"discoverer" text,
"formation" text,
"location" text
);
Question: What is the name of the specimen that was discovered after 1987 and is in an Indianapolis, Indiana museum?
<|assistant|>
SELECT "name" FROM "specimen_data" WHERE "discovered">1987 AND "museum_city"='indianapolis, in';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "specimen_data" (
"name" text,
"discovered" real,
"museum" text,
"museum_city" text,
"discoverer" text,
"formation" text,
"location" text
);
Question: What is the formation that had the specimen discovered before 2001 and is in an Indianapolis, Indiana museum?
<|assistant|>
SELECT "formation" FROM "specimen_data" WHERE "discovered"<2001 AND "museum_city"='indianapolis, in';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "specimen_data" (
"name" text,
"discovered" real,
"museum" text,
"museum_city" text,
"discoverer" text,
"formation" text,
"location" text
);
Question: What is the city of the Museum that houses the specimen discovered by Jane Solem?
<|assistant|>
SELECT "museum_city" FROM "specimen_data" WHERE "discoverer"='jane solem';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "specimen_data" (
"name" text,
"discovered" real,
"museum" text,
"museum_city" text,
"discoverer" text,
"formation" text,
"location" text
);
Question: What city has the museum that holds the Sue specimen?
<|assistant|>
SELECT "museum_city" FROM "specimen_data" WHERE "name"='sue';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grey_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" text
);
Question: With what Name does the Roll of 637 belong?
<|assistant|>
SELECT "name" FROM "grey_district" WHERE "roll"='637';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grey_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" text
);
Question: Which is the Authority that has a Roll of 70?
<|assistant|>
SELECT "authority" FROM "grey_district" WHERE "roll"='70';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grey_district" (
"name" text,
"years" text,
"area" text,
"authority" text,
"decile" text,
"roll" text
);
Question: The Decile of 6 has which corresponding Years?
<|assistant|>
SELECT "years" FROM "grey_district" WHERE "decile"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"film" text,
"director_s" text,
"writer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Name the award for candida scott knight
<|assistant|>
SELECT "award" FROM "2004" WHERE "director_s"='candida scott knight';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"film" text,
"director_s" text,
"writer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Name the recipient for jamaica and award of £6,947
<|assistant|>
SELECT "recipient" FROM "2004" WHERE "award"='£6,947' AND "film"='jamaica';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"film" text,
"director_s" text,
"writer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Name the film for award of £3,740
<|assistant|>
SELECT "film" FROM "2004" WHERE "award"='£3,740';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"film" text,
"director_s" text,
"writer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Name the director for maya vision international ltd
<|assistant|>
SELECT "director_s" FROM "2004" WHERE "recipient"='maya vision international ltd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004" (
"film" text,
"director_s" text,
"writer_s" text,
"recipient" text,
"date" text,
"award" text
);
Question: Name the film for award of £3,386
<|assistant|>
SELECT "film" FROM "2004" WHERE "award"='£3,386';<|endoftext|>
|
<|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: Name the venue for 2004 and position of 25th
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "position"='25th' AND "year"=2004;<|endoftext|>
|
<|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: Name the venue for 27th position
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "position"='27th';<|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 draw in the 2005 FIFA Confederations Cup?
<|assistant|>
SELECT "score" FROM "international_goals" WHERE "competition"='2005 fifa confederations cup' AND "result"='draw';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "votes_by_state" (
"state" text,
"electors" real,
"bush" real,
"kerry" real,
"nader" real,
"badnarik" real,
"peroutka" real,
"cobb" real,
"others" real,
"margin" text,
"total" real
);
Question: How many electors has 465,151 naders and more than 143,630 Peroutka?
<|assistant|>
SELECT SUM("electors") FROM "votes_by_state" WHERE "nader"='465,151' AND "peroutka">'143,630';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "votes_by_state" (
"state" text,
"electors" real,
"bush" real,
"kerry" real,
"nader" real,
"badnarik" real,
"peroutka" real,
"cobb" real,
"others" real,
"margin" text,
"total" real
);
Question: What is the highest Peroutka with 46 others, and less than 15 electors?
<|assistant|>
SELECT MAX("peroutka") FROM "votes_by_state" WHERE "others"=46 AND "electors"<15;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "one_day_final_1988_2009" (
"year" text,
"venue" text,
"winners" text,
"runner_up" text,
"3rd_place" text
);
Question: Who came in 3rd place in 1990?
<|assistant|>
SELECT "3rd_place" FROM "one_day_final_1988_2009" WHERE "year"='1990';<|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: Which class Pos has a Team of jml team panoz?
<|assistant|>
SELECT "class_pos" FROM "24_hours_of_le_mans_results" WHERE "team"='jml team panoz';<|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: Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?
<|assistant|>
SELECT "class_pos" FROM "24_hours_of_le_mans_results" WHERE "year">1997 AND "team"='corvette racing' AND "class"='gt1' AND "laps"=327;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nominations" (
"no_1" text,
"no_2" text,
"no_3" text,
"no_4" text,
"no_5" text,
"no_6" text,
"no_7" text,
"no_8" text,
"final" text
);
Question: What is the final result of the team that has Simara as No.5?
<|assistant|>
SELECT "final" FROM "nominations" WHERE "no_5"='simara';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_indy_500_summary" (
"season" real,
"cars_entered" real,
"winning_driver" text,
"second_driver" text,
"third_driver" text,
"race_report" text
);
Question: Which Winning Driver has a Second Driver of jimmy bryan?
<|assistant|>
SELECT "winning_driver" FROM "world_championship_indy_500_summary" WHERE "second_driver"='jimmy bryan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_indy_500_summary" (
"season" real,
"cars_entered" real,
"winning_driver" text,
"second_driver" text,
"third_driver" text,
"race_report" text
);
Question: How many average Cars Entered have a Third Driver of manny ayulo?
<|assistant|>
SELECT AVG("cars_entered") FROM "world_championship_indy_500_summary" WHERE "third_driver"='manny ayulo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_indy_500_summary" (
"season" real,
"cars_entered" real,
"winning_driver" text,
"second_driver" text,
"third_driver" text,
"race_report" text
);
Question: What are the largest Cars Entered with a Season of 1958?
<|assistant|>
SELECT MAX("cars_entered") FROM "world_championship_indy_500_summary" WHERE "season"=1958;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_indy_500_summary" (
"season" real,
"cars_entered" real,
"winning_driver" text,
"second_driver" text,
"third_driver" text,
"race_report" text
);
Question: What is the largest season with a Third Driver of jimmy davies?
<|assistant|>
SELECT MAX("season") FROM "world_championship_indy_500_summary" WHERE "third_driver"='jimmy davies';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_indy_500_summary" (
"season" real,
"cars_entered" real,
"winning_driver" text,
"second_driver" text,
"third_driver" text,
"race_report" text
);
Question: What are the largest Cars Entered with a Winning Driver of rodger ward, and a Season smaller than 1959?
<|assistant|>
SELECT MAX("cars_entered") FROM "world_championship_indy_500_summary" WHERE "winning_driver"='rodger ward' AND "season"<1959;<|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 engine with more than 2 points has Brabham bt58 as Chassis?
<|assistant|>
SELECT "engine" FROM "complete_formula_one_results" WHERE "chassis"='brabham bt58' AND "points">2;<|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: How many points did Judd v8 has in 1989?
<|assistant|>
SELECT COUNT("points") FROM "complete_formula_one_results" WHERE "engine"='judd v8' AND "year"=1989;<|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: How many years has Sasol Jordan Yamaha as an Entrant?
<|assistant|>
SELECT AVG("year") FROM "complete_formula_one_results" WHERE "entrant"='sasol jordan yamaha';<|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 was the record for the game that had a loss of Williams (3-1)?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "loss"='williams (3-1)';<|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 was the score of the game that had a loss of Embree (1-2)?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "loss"='embree (1-2)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What shows for 2007 at the Olympic Games as tournament.
<|assistant|>
SELECT "2007" FROM "singles_performance_timeline" WHERE "tournament"='olympic games';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What shows for 2009 when the 2012 is 1R?
<|assistant|>
SELECT "2009" FROM "singles_performance_timeline" WHERE "2012"='1r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
);
Question: What is the 2010 when the 2009 shows Q1?
<|assistant|>
SELECT "2010" FROM "singles_performance_timeline" WHERE "2009"='q1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"state" text,
"tickets_sold_available" text,
"gross_revenue_1982" text,
"gross_revenue_2011" text
);
Question: What is the gross revenue in 2011 for MO?
<|assistant|>
SELECT "gross_revenue_2011" FROM "box_office_score_data" WHERE "state"='mo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"state" text,
"tickets_sold_available" text,
"gross_revenue_1982" text,
"gross_revenue_2011" text
);
Question: Which state has the venue Tsukisamu dome?
<|assistant|>
SELECT "state" FROM "box_office_score_data" WHERE "venue"='tsukisamu dome';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"state" text,
"tickets_sold_available" text,
"gross_revenue_1982" text,
"gross_revenue_2011" text
);
Question: Which city had a gross revenue in 2011 of $739,578?
<|assistant|>
SELECT "city" FROM "box_office_score_data" WHERE "gross_revenue_2011"='$739,578';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "box_office_score_data" (
"venue" text,
"city" text,
"state" text,
"tickets_sold_available" text,
"gross_revenue_1982" text,
"gross_revenue_2011" text
);
Question: What is the gross revenue in 2011 with a gross revenue in 1982 of $1,988,047?
<|assistant|>
SELECT "gross_revenue_2011" FROM "box_office_score_data" WHERE "gross_revenue_1982"='$1,988,047';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: What was the grid when the driver was Mark Webber?
<|assistant|>
SELECT "grid" FROM "race" WHERE "driver"='mark webber';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: Who was the driver, when the constructor was Renault, and when the Time/Retired was +38.600?
<|assistant|>
SELECT "driver" FROM "race" WHERE "constructor"='renault' AND "time_retired"='+38.600';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: How many laps were there when the Time/Retired was +1:00.003?
<|assistant|>
SELECT "laps" FROM "race" WHERE "time_retired"='+1:00.003';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: How many laps were there when the Time/Retired was +14.403?
<|assistant|>
SELECT "laps" FROM "race" WHERE "time_retired"='+14.403';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: Who was the driver when there were 35 laps?
<|assistant|>
SELECT "driver" FROM "race" WHERE "laps"='35';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" text,
"time_retired" text,
"grid" text
);
Question: How many laps were there when the constructor was Renault, and when the Driver was Fernando Alonso?
<|assistant|>
SELECT "laps" FROM "race" WHERE "constructor"='renault' AND "driver"='fernando alonso';<|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_feet_m" text,
"floors" real
);
Question: What's the Street address with a Name of New York Life Insurance building?
<|assistant|>
SELECT "street_address" FROM "timeline_of_tallest_buildings" WHERE "name"='new york life insurance building';<|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_feet_m" text,
"floors" real
);
Question: What's the Years as tallest with a Street address of 324 E. 11th Street?
<|assistant|>
SELECT "years_as_tallest" FROM "timeline_of_tallest_buildings" WHERE "street_address"='324 e. 11th street';<|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_feet_m" text,
"floors" real
);
Question: What is listsed as the Height feet/m and has a Street address of 2345 Grand Avenue?
<|assistant|>
SELECT "height_feet_m" FROM "timeline_of_tallest_buildings" WHERE "street_address"='2345 grand avenue';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ontario_university_athletics_yates_cup" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"football_stadium" text,
"capacity" real
);
Question: What is the average capacity of stadiums in the City of London that belong to schools with an enrollment less than 30,000?
<|assistant|>
SELECT AVG("capacity") FROM "ontario_university_athletics_yates_cup" WHERE "city"='london' AND "enrollment"<'30,000';<|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: Who had a score of 69-70=139?
<|assistant|>
SELECT "player" FROM "second_round" WHERE "score"='69-70=139';<|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 game that had a result of 5–0?
<|assistant|>
SELECT "score" FROM "international_goals" WHERE "result"='5–0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the heat number of the athlete who finished in 2:23.95?
<|assistant|>
SELECT AVG("heat") FROM "heats" WHERE "time"='2:23.95';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Which lane did the athlete from Zambia swim in?
<|assistant|>
SELECT "lane" FROM "heats" WHERE "nationality"='zambia';<|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 opponent at the game when the record was 4-5?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='4-5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: What is the average for 2009 when 2001 is more than 0, 1996 is less than 1 and 2004 is more than 2
<|assistant|>
SELECT AVG("2009") FROM "breakdown_by_nationality" WHERE "2001">0 AND "1996"<1 AND "2004">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: What is the listing for 2009 when 1989 is less than 0?
<|assistant|>
SELECT SUM("2009") FROM "breakdown_by_nationality" WHERE "1989"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: what is the average for 2005 when 1995 is more than 3, 1996 is less than 4, and 2011 is more than 5?
<|assistant|>
SELECT AVG("2005") FROM "breakdown_by_nationality" WHERE "1995">3 AND "1996"<4 AND "2011">5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: what is the listing for 1999 when 1990 is more than 0, 2003 is 3, 2007 is more than 1 and 1996 is more than 0?
<|assistant|>
SELECT SUM("1999") FROM "breakdown_by_nationality" WHERE "1990">0 AND "2003"=3 AND "2007">1 AND "1996">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: what is the listing for 2012 when 2004 is more than 0, 2008 is more than 1 1994 is 8 and 2005 is less than 11?
<|assistant|>
SELECT MIN("2012") FROM "breakdown_by_nationality" WHERE "2004">0 AND "2008">1 AND "1994"=8 AND "2005"<11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "breakdown_by_nationality" (
"country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
);
Question: what is the listing for 1992 when 1999 is more than 1, 2008 is less than 2 and 2003 is less than 2?
<|assistant|>
SELECT SUM("1992") FROM "breakdown_by_nationality" WHERE "1999">1 AND "2008"<2 AND "2003"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "periodization" (
"week" real,
"set_1" text,
"set_2" text,
"set_3" text,
"set_4" text,
"set_5" text,
"volume_lbs" real,
"peak_intensity_last_set" text,
"pct_of_1_rep_max_last_set" text
);
Question: How many % of 1 Rep Max(Last Set) has a Set 4 of 145lb x 5reps?
<|assistant|>
SELECT "pct_of_1_rep_max_last_set" FROM "periodization" WHERE "set_4"='145lb x 5reps';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "periodization" (
"week" real,
"set_1" text,
"set_2" text,
"set_3" text,
"set_4" text,
"set_5" text,
"volume_lbs" real,
"peak_intensity_last_set" text,
"pct_of_1_rep_max_last_set" text
);
Question: How many lbs does a set 4 of 115lb x 8reps have?
<|assistant|>
SELECT "volume_lbs" FROM "periodization" WHERE "set_4"='115lb x 8reps';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "periodization" (
"week" real,
"set_1" text,
"set_2" text,
"set_3" text,
"set_4" text,
"set_5" text,
"volume_lbs" real,
"peak_intensity_last_set" text,
"pct_of_1_rep_max_last_set" text
);
Question: What is set 3 on week 6?
<|assistant|>
SELECT "set_3" FROM "periodization" WHERE "week"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1995_enlargement" (
"member_countries" text,
"population" text,
"area_km" text,
"gdp_billion_us" text,
"gdp_per_capita_us" text
);
Question: What is the per-capita GDP for the country with an overall GDP of 156.640?
<|assistant|>
SELECT "gdp_per_capita_us" FROM "1995_enlargement" WHERE "gdp_billion_us"='156.640';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1995_enlargement" (
"member_countries" text,
"population" text,
"area_km" text,
"gdp_billion_us" text,
"gdp_per_capita_us" text
);
Question: What is the per-capita GDP of the country with an overall GDP of 80.955?
<|assistant|>
SELECT "gdp_per_capita_us" FROM "1995_enlargement" WHERE "gdp_billion_us"='80.955';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1995_enlargement" (
"member_countries" text,
"population" text,
"area_km" text,
"gdp_billion_us" text,
"gdp_per_capita_us" text
);
Question: Which country has an area of 871,980 square km?
<|assistant|>
SELECT "member_countries" FROM "1995_enlargement" WHERE "area_km"='871,980';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_11_8_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
Question: On October 1, 1995 with Dora Djilianova as a partner, what was the outcome of the match?
<|assistant|>
SELECT "outcome" FROM "doubles_11_8_3" WHERE "partner"='dora djilianova' AND "date"='october 1, 1995';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_11_8_3" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_the_final" text,
"score_in_the_final" text
);
Question: With Lindsay Lee-Waters as a partner, what was the final score?
<|assistant|>
SELECT "score_in_the_final" FROM "doubles_11_8_3" WHERE "partner"='lindsay lee-waters';<|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: Which score has a Date of august 17?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "date"='august 17';<|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: Which score has an Opponent of @ athletics, and a Record of 76-57?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "opponent"='@ athletics' AND "record"='76-57';<|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: Which loss has a Record of 67-51?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='67-51';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"races" text,
"wins" text,
"position" text
);
Question: Which position has 2 wins in 1992?
<|assistant|>
SELECT "position" FROM "career_summary" WHERE "wins"='2' AND "season"=1992;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"races" text,
"wins" text,
"position" text
);
Question: How many wins have a Series of formula nippon, and a Position of 8th?
<|assistant|>
SELECT "wins" FROM "career_summary" WHERE "series"='formula nippon' AND "position"='8th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "career_summary" (
"season" real,
"series" text,
"races" text,
"wins" text,
"position" text
);
Question: What is the smallest season with 6 races, 2 wins, and a Series of all-japan gt championship>
<|assistant|>
SELECT MIN("season") FROM "career_summary" WHERE "races"='6' AND "series"='all-japan gt championship' AND "wins"='2';<|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 Mark Brooks total score when he finished more than 2 above par?
<|assistant|>
SELECT AVG("total") FROM "missed_the_cut" WHERE "to_par">2 AND "player"='mark brooks';<|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 the winning to par score of the 1993 PGA Championship?
<|assistant|>
SELECT "to_par" FROM "missed_the_cut" WHERE "year_s_won"='1993';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "equipment" (
"builder" text,
"construct_tion_no" real,
"date_ordered" text,
"wheel_arrange_ment" text,
"s_cylinder" text,
"engine_weight" text,
"tc_st_l_no_1883_84" real
);
Question: How many constructions has a Wheel arrange- ment of 4-4-0?
<|assistant|>
SELECT SUM("construct_tion_no") FROM "equipment" WHERE "wheel_arrange_ment"='4-4-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "equipment" (
"builder" text,
"construct_tion_no" real,
"date_ordered" text,
"wheel_arrange_ment" text,
"s_cylinder" text,
"engine_weight" text,
"tc_st_l_no_1883_84" real
);
Question: Who built the order on November 1881 of more than 54 TC&StL no. (1883–84)?
<|assistant|>
SELECT "builder" FROM "equipment" WHERE "tc_st_l_no_1883_84">54 AND "date_ordered"='november 1881';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
Question: What is the Season Outcome for the Sussex Central School?
<|assistant|>
SELECT "season_outcome" FROM "2010_regular_season_football_standings" WHERE "school"='sussex central';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
Question: What is the School of Sussex Tech's Team?
<|assistant|>
SELECT "team" FROM "2010_regular_season_football_standings" WHERE "school"='sussex tech';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_regular_season_football_standings" (
"school" text,
"team" text,
"division_record" text,
"overall_record" text,
"season_outcome" text
);
Question: What is the Team for the Milford School?
<|assistant|>
SELECT "team" FROM "2010_regular_season_football_standings" WHERE "school"='milford';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"season" text,
"player" text,
"team" text,
"position" text,
"rating" text,
"win_num" text
);
Question: Which season was one of the players rated +33?
<|assistant|>
SELECT "season" FROM "winners" WHERE "rating"='+33';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"season" text,
"player" text,
"team" text,
"position" text,
"rating" text,
"win_num" text
);
Question: What is the name of the team that had 1 win and a rating of +85?
<|assistant|>
SELECT "team" FROM "winners" WHERE "win_num"='1' AND "rating"='+85';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"season" text,
"player" text,
"team" text,
"position" text,
"rating" text,
"win_num" text
);
Question: Which season was one of the players rated +98?
<|assistant|>
SELECT "season" FROM "winners" WHERE "rating"='+98';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners" (
"season" text,
"player" text,
"team" text,
"position" text,
"rating" text,
"win_num" text
);
Question: What is Patrice Bergeron's rating?
<|assistant|>
SELECT "rating" FROM "winners" WHERE "player"='patrice bergeron';<|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: Position of defensive tackle, and a Round of 4, and a Pick # smaller than 36 has what overall average?
<|assistant|>
SELECT AVG("overall") FROM "indianapolis_colts_draft_history" WHERE "position"='defensive tackle' AND "round"=4 AND "pick_num"<36;<|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: Pick # that has a Name of jaimie thomas, and a Round smaller than 7 is how many numbers?
<|assistant|>
SELECT COUNT("pick_num") FROM "indianapolis_colts_draft_history" WHERE "name"='jaimie thomas' AND "round"<7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mt_and_cr_series_models" (
"colt_model_no" text,
"name" text,
"stock" text,
"fire_control" text,
"rear_sight" text,
"forward_assist" text,
"case_deflector" text,
"barrel_length" text,
"barrel_profile" text,
"barrel_twist" text,
"hand_guards" text,
"bayonet_lug" text,
"muzzle_device" text
);
Question: What is the muzzle device with a 1:7 barrel twist and a stock 4th generation?
<|assistant|>
SELECT "muzzle_device" FROM "mt_and_cr_series_models" WHERE "barrel_twist"='1:7' AND "stock"='4th generation';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_team_matches" (
"date" text,
"location" text,
"opponenent" text,
"result" text,
"match_type" text
);
Question: When was the opponent Poland and the match type EC -qualifier?
<|assistant|>
SELECT "date" FROM "national_team_matches" WHERE "opponenent"='poland' AND "match_type"='ec -qualifier';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.