text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1950s" (
"country" text,
"1951" real,
"1952" real,
"1953" real,
"1954" real,
"1955" real,
"1956" real,
"1957" real,
"1958" real,
"1959" real
);
Question: What is the 1955 rate when the 1956 is more than 2.9, and 1953 is larger than 4.5?
<|assistant|>
SELECT SUM("1955") FROM "1950s" WHERE "1956">2.9 AND "1953">4.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "signings" (
"rank" real,
"player" text,
"from" text,
"transfer_fee_millions" text,
"year" real
);
Question: Where was Alex Song signed from after 2010?
<|assistant|>
SELECT "from" FROM "signings" WHERE "year">2010 AND "player"='alex song';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "signings" (
"rank" real,
"player" text,
"from" text,
"transfer_fee_millions" text,
"year" real
);
Question: How many players were signed from Sevilla?
<|assistant|>
SELECT COUNT("year") FROM "signings" WHERE "from"='sevilla';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dansefeber" (
"week" real,
"partner" text,
"dance" text,
"music" text,
"result" text
);
Question: In what Week resulting in the bottom 3 was Endre Jansen Partner?
<|assistant|>
SELECT MAX("week") FROM "dansefeber" WHERE "result"='bottom 3' AND "partner"='endre jansen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dansefeber" (
"week" real,
"partner" text,
"dance" text,
"music" text,
"result" text
);
Question: What Dance in Week 1 resulted in Safe?
<|assistant|>
SELECT "dance" FROM "dansefeber" WHERE "result"='safe' AND "week"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dansefeber" (
"week" real,
"partner" text,
"dance" text,
"music" text,
"result" text
);
Question: In what Week was the Locking Dance?
<|assistant|>
SELECT MAX("week") FROM "dansefeber" WHERE "dance"='locking';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
Question: What position has 7 as the round, with a pick # less than 214?
<|assistant|>
SELECT "position" FROM "nfl_draft" WHERE "round"=7 AND "pick_num"<214;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
Question: What college has a round greater than 1, with dylan mcfarland as the player?
<|assistant|>
SELECT "college" FROM "nfl_draft" WHERE "round">1 AND "player"='dylan mcfarland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
Question: What player has a pick # greater than 207?
<|assistant|>
SELECT "player" FROM "nfl_draft" WHERE "pick_num">207;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_american_albums" (
"rank" real,
"artist" text,
"album" text,
"peak_position" real,
"sales" real,
"certification" text
);
Question: Which artist had a 4x platinum?
<|assistant|>
SELECT "artist" FROM "top_10_american_albums" WHERE "certification"='4x platinum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_american_albums" (
"rank" real,
"artist" text,
"album" text,
"peak_position" real,
"sales" real,
"certification" text
);
Question: What was the highest peak position for the album one of the boys?
<|assistant|>
SELECT MAX("peak_position") FROM "top_10_american_albums" WHERE "album"='one of the boys';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_american_albums" (
"rank" real,
"artist" text,
"album" text,
"peak_position" real,
"sales" real,
"certification" text
);
Question: How many sales had a peak position of 1 and a certification of 6x platinum?
<|assistant|>
SELECT COUNT("sales") FROM "top_10_american_albums" WHERE "peak_position"=1 AND "certification"='6x platinum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_american_albums" (
"rank" real,
"artist" text,
"album" text,
"peak_position" real,
"sales" real,
"certification" text
);
Question: What album had a peak position of 6 and a certification of 3x platinum?
<|assistant|>
SELECT "album" FROM "top_10_american_albums" WHERE "certification"='3x platinum' AND "peak_position"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_american_albums" (
"rank" real,
"artist" text,
"album" text,
"peak_position" real,
"sales" real,
"certification" text
);
Question: How many sales had a peak position more than 2 and a Certification of 3x platinum?
<|assistant|>
SELECT COUNT("sales") FROM "top_10_american_albums" WHERE "peak_position">2 AND "certification"='3x platinum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_3" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who were the rowers who had a time of 7:39.70?
<|assistant|>
SELECT "rowers" FROM "heat_3" WHERE "time"='7:39.70';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_3" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who were the rowers from china wh had a rank smaller than 4?
<|assistant|>
SELECT "rowers" FROM "heat_3" WHERE "rank"<4 AND "country"='china';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_3" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the notes for the rowers from denmark?
<|assistant|>
SELECT "notes" FROM "heat_3" WHERE "country"='denmark';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Bronze has a Nation of austria, and a Total larger than 6?
<|assistant|>
SELECT MAX("bronze") FROM "medals_table" WHERE "nation"='austria' AND "total">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Rank has a Silver of 1, and a Gold of 0, and a Nation of austria?
<|assistant|>
SELECT "rank" FROM "medals_table" WHERE "silver"=1 AND "gold"=0 AND "nation"='austria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Total has a Rank of 5, and a Bronze smaller than 0?
<|assistant|>
SELECT AVG("total") FROM "medals_table" WHERE "rank"='5' AND "bronze"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Total has a Bronze of 5, and a Silver smaller than 1?
<|assistant|>
SELECT MIN("total") FROM "medals_table" WHERE "bronze"=5 AND "silver"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_of_the_circuit_des_ardennes" (
"year" real,
"formula" text,
"driver" text,
"constructor" text,
"location" text,
"report" text
);
Question: What is the highest year with a formula of Grand Prix?
<|assistant|>
SELECT MAX("year") FROM "winners_of_the_circuit_des_ardennes" WHERE "formula"='grand prix';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_of_the_circuit_des_ardennes" (
"year" real,
"formula" text,
"driver" text,
"constructor" text,
"location" text,
"report" text
);
Question: Which formula had a driver of John Moore-Brabazon?
<|assistant|>
SELECT "formula" FROM "winners_of_the_circuit_des_ardennes" WHERE "driver"='john moore-brabazon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_of_the_circuit_des_ardennes" (
"year" real,
"formula" text,
"driver" text,
"constructor" text,
"location" text,
"report" text
);
Question: Which driver had a year under 1905?
<|assistant|>
SELECT "driver" FROM "winners_of_the_circuit_des_ardennes" WHERE "year"<1905;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_of_the_circuit_des_ardennes" (
"year" real,
"formula" text,
"driver" text,
"constructor" text,
"location" text,
"report" text
);
Question: How many years had a formula of Grand Prix?
<|assistant|>
SELECT COUNT("year") FROM "winners_of_the_circuit_des_ardennes" WHERE "formula"='grand prix';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_of_the_circuit_des_ardennes" (
"year" real,
"formula" text,
"driver" text,
"constructor" text,
"location" text,
"report" text
);
Question: Which location was won by George Heath?
<|assistant|>
SELECT "location" FROM "winners_of_the_circuit_des_ardennes" WHERE "driver"='george heath';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_statistics_at_least_1_000_000_passe" (
"country" text,
"airport" text,
"city" text,
"2010" real,
"change_10_09" text
);
Question: What is the 2010 total for ghana?
<|assistant|>
SELECT COUNT("2010") FROM "2010_statistics_at_least_1_000_000_passe" WHERE "country"='ghana';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_statistics_at_least_1_000_000_passe" (
"country" text,
"airport" text,
"city" text,
"2010" real,
"change_10_09" text
);
Question: Which country is the nnamdi azikiwe international airport in?
<|assistant|>
SELECT "country" FROM "2010_statistics_at_least_1_000_000_passe" WHERE "airport"='nnamdi azikiwe international airport';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_3" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is the average lane for Kenya with react larger than 0.212?
<|assistant|>
SELECT AVG("lane") FROM "heat_3" WHERE "nationality"='kenya' AND "react">0.212;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: what is the highest rank for tim maeyens?
<|assistant|>
SELECT MAX("rank") FROM "heat_1" WHERE "athlete"='tim maeyens';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: what is the notes for andre vonarburg?
<|assistant|>
SELECT "notes" FROM "heat_1" WHERE "athlete"='andre vonarburg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: Who is the athlete from greece?
<|assistant|>
SELECT "athlete" FROM "heat_1" WHERE "country"='greece';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: who is the athlete with the rank smaller than 2?
<|assistant|>
SELECT "athlete" FROM "heat_1" WHERE "rank"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: what is the notes for the athlete with the time of 7:38.87?
<|assistant|>
SELECT "notes" FROM "heat_1" WHERE "time"='7:38.87';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the sum of the gold medals of the nation with 4 silvers and more than 6 total medals?
<|assistant|>
SELECT SUM("gold") FROM "medals_table" WHERE "silver"=4 AND "total">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the highest number of bronze medals of west germany, which has more than 0 golds?
<|assistant|>
SELECT MAX("bronze") FROM "medals_table" WHERE "nation"='west germany' AND "gold">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the average total medals of the soviet union, which has more than 2 bronze and more than 0 silver medals?
<|assistant|>
SELECT AVG("total") FROM "medals_table" WHERE "bronze">2 AND "silver">0 AND "nation"='soviet union';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westbound_record_breakers_blue_riband_ho" (
"ship" text,
"year" real,
"dates" text,
"line" text,
"from" text,
"distance" text,
"days_hours_minutes" text,
"speed" text
);
Question: What year did the ship Europa, have the dates of 14 – 23 October?
<|assistant|>
SELECT AVG("year") FROM "westbound_record_breakers_blue_riband_ho" WHERE "ship"='europa' AND "dates"='14 – 23 october';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westbound_record_breakers_blue_riband_ho" (
"ship" text,
"year" real,
"dates" text,
"line" text,
"from" text,
"distance" text,
"days_hours_minutes" text,
"speed" text
);
Question: What is the ship in the Cunard line from Liverpool 19 – 29 July?
<|assistant|>
SELECT "ship" FROM "westbound_record_breakers_blue_riband_ho" WHERE "line"='cunard' AND "from"='liverpool' AND "dates"='19 – 29 july';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westbound_record_breakers_blue_riband_ho" (
"ship" text,
"year" real,
"dates" text,
"line" text,
"from" text,
"distance" text,
"days_hours_minutes" text,
"speed" text
);
Question: What is the distance for 5 d, 23 h, 7 m?
<|assistant|>
SELECT "distance" FROM "westbound_record_breakers_blue_riband_ho" WHERE "days_hours_minutes"='5 d, 23 h, 7 m';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westbound_record_breakers_blue_riband_ho" (
"ship" text,
"year" real,
"dates" text,
"line" text,
"from" text,
"distance" text,
"days_hours_minutes" text,
"speed" text
);
Question: What is the Days, hours, minutes for the GW line from Liverpool?
<|assistant|>
SELECT "days_hours_minutes" FROM "westbound_record_breakers_blue_riband_ho" WHERE "line"='gw' AND "from"='liverpool';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "westbound_record_breakers_blue_riband_ho" (
"ship" text,
"year" real,
"dates" text,
"line" text,
"from" text,
"distance" text,
"days_hours_minutes" text,
"speed" text
);
Question: What is the Days, hours, minutes for 21 – 26 October?
<|assistant|>
SELECT "days_hours_minutes" FROM "westbound_record_breakers_blue_riband_ho" WHERE "dates"='21 – 26 october';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_members" (
"school" text,
"location" text,
"mascot" text,
"county" text,
"year_joined" text,
"year_left" text
);
Question: Which year did the school with the mascot of the Vikings join?
<|assistant|>
SELECT "year_joined" FROM "former_members" WHERE "mascot"='vikings';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"title" text,
"time" text,
"writer_s" text,
"performer_s" text,
"producer_s" text,
"recorded_at" text
);
Question: Who wrote the album recorded at funhouse studios with a time of 3:27?
<|assistant|>
SELECT "writer_s" FROM "track_listing" WHERE "recorded_at"='funhouse studios' AND "time"='3:27';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"title" text,
"time" text,
"writer_s" text,
"performer_s" text,
"producer_s" text,
"recorded_at" text
);
Question: Who performed the song recorded at the Cabin in the Woods Studio with a Time of 3:16?
<|assistant|>
SELECT "performer_s" FROM "track_listing" WHERE "recorded_at"='the cabin in the woods studio' AND "time"='3:16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"nation" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
Question: Which League Cup Goals have a League Cup Apps of 1 (1)?
<|assistant|>
SELECT "league_cup_goals" FROM "appearances_and_goals" WHERE "league_cup_apps"='1 (1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"nation" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
Question: Which FA Cup Apps have Total Goals larger than 6, and an FA Cup Goals smaller than 1?
<|assistant|>
SELECT "fa_cup_apps" FROM "appearances_and_goals" WHERE "total_goals">6 AND "fa_cup_goals"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"nation" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"flt_apps" text,
"flt_goals" real,
"total_apps" text,
"total_goals" real
);
Question: How many League Goals have an FA Cup Apps of 0 (1)?
<|assistant|>
SELECT COUNT("league_goals") FROM "appearances_and_goals" WHERE "fa_cup_apps"='0 (1)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
Question: What is the lowest round number in which Will Wilcox was selected?
<|assistant|>
SELECT MIN("round") FROM "nfl_draft" WHERE "player"='will wilcox';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick_num" real,
"player" text,
"position" text,
"college" text
);
Question: Which player went to college at Tennessee-Chattanooga?
<|assistant|>
SELECT "player" FROM "nfl_draft" WHERE "college"='tennessee-chattanooga';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scandinavia" (
"peak" text,
"country" text,
"elevation_m" real,
"prominence_m" real,
"col_m" real
);
Question: Which Col (m) has an Elevation (m) smaller than 1,624?
<|assistant|>
SELECT MIN("col_m") FROM "scandinavia" WHERE "elevation_m"<'1,624';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scandinavia" (
"peak" text,
"country" text,
"elevation_m" real,
"prominence_m" real,
"col_m" real
);
Question: How much Elevation (m) has a Prominence (m) larger than 1,754?
<|assistant|>
SELECT SUM("elevation_m") FROM "scandinavia" WHERE "prominence_m">'1,754';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scandinavia" (
"peak" text,
"country" text,
"elevation_m" real,
"prominence_m" real,
"col_m" real
);
Question: Which Col (m) has a Prominence (m) larger than 1,519, and a Peak of jiehkkevárri, and an Elevation (m) larger than 1,834?
<|assistant|>
SELECT MIN("col_m") FROM "scandinavia" WHERE "prominence_m">'1,519' AND "peak"='jiehkkevárri' AND "elevation_m">'1,834';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ranking_round" (
"rank" real,
"archer" text,
"1st_half" real,
"2nd_half" real,
"score" real
);
Question: What is the highest score when the 1st half is smaller than 289 and rank smaller than 61?
<|assistant|>
SELECT MAX("score") FROM "ranking_round" WHERE "1st_half"<289 AND "rank"<61;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ranking_round" (
"rank" real,
"archer" text,
"1st_half" real,
"2nd_half" real,
"score" real
);
Question: What is the lowest first half when the score is larger than 621 and the rank 35?
<|assistant|>
SELECT MIN("1st_half") FROM "ranking_round" WHERE "score">621 AND "rank"=35;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Grid has Points larger than 10 and a Time/Retired of +13.7 secs?
<|assistant|>
SELECT "grid" FROM "race" WHERE "points">10 AND "time_retired"='+13.7 secs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Team has Points of 0, a Grid larger than 13, and a Driver of alex yoong?
<|assistant|>
SELECT "team" FROM "race" WHERE "points"=0 AND "grid">13 AND "driver"='alex yoong';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the hioghest amount of silver medals for a nation ranked higher than 19 and less than 2 gold medals?
<|assistant|>
SELECT MAX("silver") FROM "medal_table" WHERE "rank"='19' AND "gold"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What nation finished with 11 silver medals?
<|assistant|>
SELECT "nation" FROM "medal_table" WHERE "silver"=11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
Question: What is Benito Cheng's Pick number?
<|assistant|>
SELECT "pick" FROM "round_1" WHERE "player"='benito cheng';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
Question: What is the Country of origin of PIck 6?
<|assistant|>
SELECT "country_of_origin" FROM "round_1" WHERE "pick"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
Question: What is Richard Bachmann's PBA team?
<|assistant|>
SELECT "pba_team" FROM "round_1" WHERE "player"='richard bachmann';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_1" (
"pick" real,
"player" text,
"country_of_origin" text,
"pba_team" text,
"college" text
);
Question: What is Far Eastern College Johnny Abarrientos' Pick number?
<|assistant|>
SELECT "pick" FROM "round_1" WHERE "college"='far eastern' AND "player"='johnny abarrientos';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What home team has 10 as the tie no?
<|assistant|>
SELECT "home_team" FROM "third_round_proper" WHERE "tie_no"='10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What is the game score when the tie no is 7?
<|assistant|>
SELECT "score" FROM "third_round_proper" WHERE "tie_no"='7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: Who was the away team on 10 January 1979 who had a tie no of 17?
<|assistant|>
SELECT "away_team" FROM "third_round_proper" WHERE "date"='10 january 1979' AND "tie_no"='17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: When was the game that has tie no 2?
<|assistant|>
SELECT "date" FROM "third_round_proper" WHERE "tie_no"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What round did the match at the Golden Trophy 1999 event end?
<|assistant|>
SELECT SUM("round") FROM "mixed_martial_arts_record" WHERE "event"='golden trophy 1999';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What event had a record of 8–5–1?
<|assistant|>
SELECT "event" FROM "mixed_martial_arts_record" WHERE "record"='8–5–1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "hdr_tonemapping_and_exposure_fusion" (
"name" text,
"merging_to_hdr_from_ldr_images" text,
"hdr_output_exr_hdr_logluv_etc" text,
"tonemapping" text,
"exposure_fusion" text
);
Question: What's the HDR Output that has a name of name?
<|assistant|>
SELECT "hdr_output_exr_hdr_logluv_etc" FROM "hdr_tonemapping_and_exposure_fusion" WHERE "name"='name';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "hdr_tonemapping_and_exposure_fusion" (
"name" text,
"merging_to_hdr_from_ldr_images" text,
"hdr_output_exr_hdr_logluv_etc" text,
"tonemapping" text,
"exposure_fusion" text
);
Question: What's the exposure fusion of Panoramaplus x4?
<|assistant|>
SELECT "exposure_fusion" FROM "hdr_tonemapping_and_exposure_fusion" WHERE "name"='panoramaplus x4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "hdr_tonemapping_and_exposure_fusion" (
"name" text,
"merging_to_hdr_from_ldr_images" text,
"hdr_output_exr_hdr_logluv_etc" text,
"tonemapping" text,
"exposure_fusion" text
);
Question: What's the HDR output of Photovista Panorama?
<|assistant|>
SELECT "hdr_output_exr_hdr_logluv_etc" FROM "hdr_tonemapping_and_exposure_fusion" WHERE "name"='photovista panorama';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_largest_american_football_stadium" (
"rank" real,
"stadium" text,
"capacity" text,
"location" text,
"home_team" text
);
Question: Which location has 101,119 as the capacity?
<|assistant|>
SELECT "location" FROM "top_10_largest_american_football_stadium" WHERE "capacity"='101,119';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_largest_american_football_stadium" (
"rank" real,
"stadium" text,
"capacity" text,
"location" text,
"home_team" text
);
Question: What is the lowest rank that has university park, pa as the location?
<|assistant|>
SELECT MIN("rank") FROM "top_10_largest_american_football_stadium" WHERE "location"='university park, pa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_10_largest_american_football_stadium" (
"rank" real,
"stadium" text,
"capacity" text,
"location" text,
"home_team" text
);
Question: What home team has a rank greater than 6, and 94,392 as the capacity?
<|assistant|>
SELECT "home_team" FROM "top_10_largest_american_football_stadium" WHERE "rank">6 AND "capacity"='94,392';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_in_class" (
"hull_number" text,
"name" text,
"builder" text,
"laid_down" text,
"launched" text,
"completed" text
);
Question: Who was the builder for the USS cambridge?
<|assistant|>
SELECT "builder" FROM "ships_in_class" WHERE "name"='uss cambridge';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_in_class" (
"hull_number" text,
"name" text,
"builder" text,
"laid_down" text,
"launched" text,
"completed" text
);
Question: What year was the USS Cambridge laid down?
<|assistant|>
SELECT "laid_down" FROM "ships_in_class" WHERE "name"='uss cambridge';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What was the number of the game when the record was 11-12?
<|assistant|>
SELECT "game" FROM "game_log" WHERE "record"='11-12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What was the score of Game 16?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "game"='16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What was the location and attendance at the game when the record was 9-6?
<|assistant|>
SELECT "location_attendance" FROM "game_log" WHERE "record"='9-6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "league_cup" (
"round_leg" text,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: What date has 3 as the round (leg)?
<|assistant|>
SELECT "date" FROM "league_cup" WHERE "round_leg"='3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "golden_globe_awards" (
"year" real,
"category" text,
"film" text,
"result" text,
"lost_to" text
);
Question: What was the year of Bridget Jones: The Edge of Reason that was nominated?
<|assistant|>
SELECT MIN("year") FROM "golden_globe_awards" WHERE "result"='nominated' AND "film"='bridget jones: the edge of reason';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "golden_globe_awards" (
"year" real,
"category" text,
"film" text,
"result" text,
"lost_to" text
);
Question: Who was the loss to for the film Chicago?
<|assistant|>
SELECT "lost_to" FROM "golden_globe_awards" WHERE "film"='chicago';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: Which IHSAA Football Class has a IHSAA Class of aaa, and a Location of nashville?
<|assistant|>
SELECT "ihsaa_football_class" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aaa' AND "location"='nashville';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: Which Mascot has an Enrollment of 640?
<|assistant|>
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"=640;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: Which IHSAA Class has a Location of brazil?
<|assistant|>
SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "location"='brazil';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: Which School has a Enrollment of 908?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"=908;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "criteria" (
"currency" text,
"code" text,
"entry_erm_ii" text,
"central_rate" text,
"official_target_date" text
);
Question: What type of currency has a code of SEK?
<|assistant|>
SELECT "currency" FROM "criteria" WHERE "code"='sek';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "criteria" (
"currency" text,
"code" text,
"entry_erm_ii" text,
"central_rate" text,
"official_target_date" text
);
Question: What code is used to represent the currency of Croatian Kuna?
<|assistant|>
SELECT "code" FROM "criteria" WHERE "currency"='croatian kuna';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "models" (
"chassis_code" text,
"model_years" text,
"model" text,
"engine" text,
"no_built" real
);
Question: What's the model that has chassis code W116.036?
<|assistant|>
SELECT "model" FROM "models" WHERE "chassis_code"='w116.036';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "models" (
"chassis_code" text,
"model_years" text,
"model" text,
"engine" text,
"no_built" real
);
Question: What's the years that has a chassis code of W116.025 and number built was more than 150,593?
<|assistant|>
SELECT "model_years" FROM "models" WHERE "no_built">'150,593' AND "chassis_code"='w116.025';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_german_champions_1973_1997" (
"year" text,
"champions" text,
"score" text,
"runners_up" text,
"venue" text
);
Question: What the score of the 1992 game?
<|assistant|>
SELECT "score" FROM "west_german_champions_1973_1997" WHERE "year"='1992';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_german_champions_1973_1997" (
"year" text,
"champions" text,
"score" text,
"runners_up" text,
"venue" text
);
Question: What is the score when TSV Siegen was the runner-up?
<|assistant|>
SELECT "score" FROM "west_german_champions_1973_1997" WHERE "runners_up"='tsv siegen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_german_champions_1973_1997" (
"year" text,
"champions" text,
"score" text,
"runners_up" text,
"venue" text
);
Question: What year was the game at Bad Neuenahr Eppelborn?
<|assistant|>
SELECT "year" FROM "west_german_champions_1973_1997" WHERE "venue"='bad neuenahr eppelborn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_german_champions_1973_1997" (
"year" text,
"champions" text,
"score" text,
"runners_up" text,
"venue" text
);
Question: What was the venue when the runner up was Tennis Borussia Berlin, and the score was 4 – 2 *?
<|assistant|>
SELECT "venue" FROM "west_german_champions_1973_1997" WHERE "runners_up"='tennis borussia berlin' AND "score"='4 – 2 *';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_german_champions_1973_1997" (
"year" text,
"champions" text,
"score" text,
"runners_up" text,
"venue" text
);
Question: What team was runner-up at Bergisch Gladbach in 1983?
<|assistant|>
SELECT "runners_up" FROM "west_german_champions_1973_1997" WHERE "venue"='bergisch gladbach' AND "year"='1983';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What was the time of the swimmer in lane 7?
<|assistant|>
SELECT "time" FROM "semifinal_2" WHERE "lane"=7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What was the rank of the swimmer with a time of 1:55.40?
<|assistant|>
SELECT "rank" FROM "semifinal_2" WHERE "time"='1:55.40';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"game" text,
"date" text,
"opponent" text,
"result" text,
"record" text
);
Question: What was the date for game 13?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "game"='13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"game" text,
"date" text,
"opponent" text,
"result" text,
"record" text
);
Question: What is the record for the opponent St. Louis Cardinals?
<|assistant|>
SELECT "record" FROM "schedule" WHERE "opponent"='st. louis cardinals';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.