text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_tour_results_timeline" (
"1935" text,
"1936" text,
"1937" text,
"1938" text,
"1939" text,
"1940" text,
"1941" text,
"1943" text,
"1945" text,
"1946" text,
"1947" text,
"1948" text,
"1949" text,
"1950" text,
"1951" text,
"1952" text,
"1953" text
);
Question: What 1935 has 4 as a 1953?
<|assistant|>
SELECT "1935" FROM "grand_tour_results_timeline" WHERE "1953"='4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_tour_results_timeline" (
"1935" text,
"1936" text,
"1937" text,
"1938" text,
"1939" text,
"1940" text,
"1941" text,
"1943" text,
"1945" text,
"1946" text,
"1947" text,
"1948" text,
"1949" text,
"1950" text,
"1951" text,
"1952" text,
"1953" text
);
Question: What 1953 has 2 as a 1949, and 3 as 1952?
<|assistant|>
SELECT "1953" FROM "grand_tour_results_timeline" WHERE "1949"='2' AND "1952"='3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_tour_results_timeline" (
"1935" text,
"1936" text,
"1937" text,
"1938" text,
"1939" text,
"1940" text,
"1941" text,
"1943" text,
"1945" text,
"1946" text,
"1947" text,
"1948" text,
"1949" text,
"1950" text,
"1951" text,
"1952" text,
"1953" text
);
Question: What 1941 has N/A as 1945, N/A for 1948, and 9 for 1953?
<|assistant|>
SELECT "1941" FROM "grand_tour_results_timeline" WHERE "1945"='n/a' AND "1948"='n/a' AND "1953"='9';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_tour_results_timeline" (
"1935" text,
"1936" text,
"1937" text,
"1938" text,
"1939" text,
"1940" text,
"1941" text,
"1943" text,
"1945" text,
"1946" text,
"1947" text,
"1948" text,
"1949" text,
"1950" text,
"1951" text,
"1952" text,
"1953" text
);
Question: What 1951 has dne for 1948?
<|assistant|>
SELECT "1951" FROM "grand_tour_results_timeline" WHERE "1948"='dne';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playing_career_statistics" (
"season" text,
"league_apps_sub" text,
"league_goals" text,
"cup_apps_sub" text,
"cup_goals" text,
"total_apps_sub" text,
"total_goals" text
);
Question: Which Cup Apps (sub) had 2 goals?
<|assistant|>
SELECT "cup_apps_sub" FROM "playing_career_statistics" WHERE "cup_goals"='2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playing_career_statistics" (
"season" text,
"league_apps_sub" text,
"league_goals" text,
"cup_apps_sub" text,
"cup_goals" text,
"total_apps_sub" text,
"total_goals" text
);
Question: Which Total Apps (sub) has 6 goals total?
<|assistant|>
SELECT "total_apps_sub" FROM "playing_career_statistics" WHERE "total_goals"='6';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_korea" (
"airline" text,
"icao" text,
"iata" text,
"callsign" text,
"commenced_operations" text
);
Question: What airline has a IATA of BX?
<|assistant|>
SELECT "airline" FROM "south_korea" WHERE "iata"='bx';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_korea" (
"airline" text,
"icao" text,
"iata" text,
"callsign" text,
"commenced_operations" text
);
Question: What is the ICAO for Asiana Airlines?
<|assistant|>
SELECT "icao" FROM "south_korea" WHERE "airline"='asiana airlines';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_korea" (
"airline" text,
"icao" text,
"iata" text,
"callsign" text,
"commenced_operations" text
);
Question: What is the commenced operation where the ICAO is KAL?
<|assistant|>
SELECT "commenced_operations" FROM "south_korea" WHERE "icao"='kal';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_korea" (
"airline" text,
"icao" text,
"iata" text,
"callsign" text,
"commenced_operations" text
);
Question: What is the ICAO for Air Busan?
<|assistant|>
SELECT "icao" FROM "south_korea" WHERE "callsign"='air busan';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_korea" (
"airline" text,
"icao" text,
"iata" text,
"callsign" text,
"commenced_operations" text
);
Question: What is the callsign where the ICAO is AAR?
<|assistant|>
SELECT "callsign" FROM "south_korea" WHERE "icao"='aar';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"tries" real,
"goals" real,
"field_goals" real,
"points" real
);
Question: What is the highest Goal for danny williams, with more than 0 Field Goals?
<|assistant|>
SELECT MAX("goals") FROM "scorers" WHERE "player"='danny williams' AND "field_goals">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"tries" real,
"goals" real,
"field_goals" real,
"points" real
);
Question: What is the average Tries with less than 0 goals?
<|assistant|>
SELECT AVG("tries") FROM "scorers" WHERE "goals"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"tries" real,
"goals" real,
"field_goals" real,
"points" real
);
Question: What is the total number of Points with less than 1 tries, and more than 0 goals?
<|assistant|>
SELECT COUNT("points") FROM "scorers" WHERE "tries"<1 AND "goals">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_squad" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
Question: Which club/province has more than 9 caps and Ben Franks as a player?
<|assistant|>
SELECT "club_province" FROM "current_squad" WHERE "caps">9 AND "player"='ben franks';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_12" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: In which tournament was Ian Baker-Finch the runner-up?
<|assistant|>
SELECT "tournament" FROM "pga_tour_wins_12" WHERE "runner_s_up"='ian baker-finch';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_12" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What tournament was played on Feb 3, 1991?
<|assistant|>
SELECT "tournament" FROM "pga_tour_wins_12" WHERE "date"='feb 3, 1991';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_12" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: In the Phoenix Open, what was the winning score?
<|assistant|>
SELECT "winning_score" FROM "pga_tour_wins_12" WHERE "tournament"='phoenix open';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_12" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: In the tournament where Stuart Appleby was the runner-up, what was the margin of victory?
<|assistant|>
SELECT "margin_of_victory" FROM "pga_tour_wins_12" WHERE "runner_s_up"='stuart appleby';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What is the lowest number played with more than 30 points?
<|assistant|>
SELECT MIN("played") FROM "campeonato_paulista" WHERE "points">30;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What is the highest number lost with more than 29 points and an against less than 19?
<|assistant|>
SELECT MAX("lost") FROM "campeonato_paulista" WHERE "points">29 AND "against"<19;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What is the total number played with a difference of 22 and less than 34 against?
<|assistant|>
SELECT COUNT("played") FROM "campeonato_paulista" WHERE "difference"='22' AND "against"<34;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "i_que_ds" (
"western_title" text,
"chinese_title" text,
"pinyin" text,
"released_date" text,
"genre" text,
"game_modes" text
);
Question: What is the western title of the pinyin new chāojí mǎlìōu xiōngdì?
<|assistant|>
SELECT "western_title" FROM "i_que_ds" WHERE "pinyin"='new chāojí mǎlìōu xiōngdì';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "i_que_ds" (
"western_title" text,
"chinese_title" text,
"pinyin" text,
"released_date" text,
"genre" text,
"game_modes" text
);
Question: What is the genre of the Chinese title 摸摸瓦力欧制造, which has a single-player game mode?
<|assistant|>
SELECT "genre" FROM "i_que_ds" WHERE "game_modes"='single-player' AND "chinese_title"='摸摸瓦力欧制造';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "i_que_ds" (
"western_title" text,
"chinese_title" text,
"pinyin" text,
"released_date" text,
"genre" text,
"game_modes" text
);
Question: What is the pinyin for the Chinese title 直感一笔?
<|assistant|>
SELECT "pinyin" FROM "i_que_ds" WHERE "chinese_title"='直感一笔';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "i_que_ds" (
"western_title" text,
"chinese_title" text,
"pinyin" text,
"released_date" text,
"genre" text,
"game_modes" text
);
Question: What is the release date for the Chinese title 摸摸瓦力欧制造?
<|assistant|>
SELECT "released_date" FROM "i_que_ds" WHERE "chinese_title"='摸摸瓦力欧制造';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "i_que_ds" (
"western_title" text,
"chinese_title" text,
"pinyin" text,
"released_date" text,
"genre" text,
"game_modes" text
);
Question: What is the western title for the puzzle genre?
<|assistant|>
SELECT "western_title" FROM "i_que_ds" WHERE "genre"='puzzle';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: What is the total number of laps for the time of +7.277 and the grid number of more than 6?
<|assistant|>
SELECT SUM("laps") FROM "superbike_race_2_classification" WHERE "time"='+7.277' AND "grid">6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: What is the smallest grid when the time is +8.051 and there were less than 23 laps?
<|assistant|>
SELECT MIN("grid") FROM "superbike_race_2_classification" WHERE "time"='+8.051' AND "laps"<23;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" real,
"goals" real
);
Question: What is the average number of goals for players ranked above 9 and playing more than 205 matches?
<|assistant|>
SELECT AVG("goals") FROM "list_of_top_association_football_goal_sc" WHERE "matches"=205 AND "rank">9;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" real,
"goals" real
);
Question: What is the average rank for players with under 205 matches and under 100 goals?
<|assistant|>
SELECT AVG("rank") FROM "list_of_top_association_football_goal_sc" WHERE "matches"<205 AND "goals"<100;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" real,
"goals" real
);
Question: What years played did the player with a rank under 10, more than 271 matches, and 152 goals have?
<|assistant|>
SELECT "years" FROM "list_of_top_association_football_goal_sc" WHERE "rank"<10 AND "matches">271 AND "goals"=152;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1942_state_election_results" (
"republican_ticket" text,
"democratic_ticket" text,
"american_labor_ticket" text,
"communist_ticket" text,
"socialist_ticket" text
);
Question: Who's the Republican ticket with a Communist ticket of elizabeth gurley flynn?
<|assistant|>
SELECT "republican_ticket" FROM "1942_state_election_results" WHERE "communist_ticket"='elizabeth gurley flynn';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1942_state_election_results" (
"republican_ticket" text,
"democratic_ticket" text,
"american_labor_ticket" text,
"communist_ticket" text,
"socialist_ticket" text
);
Question: Who's the Communist ticket with an American Labor ticket of joseph v. o'leary?
<|assistant|>
SELECT "communist_ticket" FROM "1942_state_election_results" WHERE "american_labor_ticket"='joseph v. o''leary';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1942_state_election_results" (
"republican_ticket" text,
"democratic_ticket" text,
"american_labor_ticket" text,
"communist_ticket" text,
"socialist_ticket" text
);
Question: Who's the Republican ticket with a Democratic ticket of flora d. johnson?
<|assistant|>
SELECT "republican_ticket" FROM "1942_state_election_results" WHERE "democratic_ticket"='flora d. johnson';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1942_state_election_results" (
"republican_ticket" text,
"democratic_ticket" text,
"american_labor_ticket" text,
"communist_ticket" text,
"socialist_ticket" text
);
Question: Who's the Republican ticket with a Communist ticket of (none), and a Socialist ticket of joseph g. glass?
<|assistant|>
SELECT "republican_ticket" FROM "1942_state_election_results" WHERE "communist_ticket"='(none)' AND "socialist_ticket"='joseph g. glass';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1942_state_election_results" (
"republican_ticket" text,
"democratic_ticket" text,
"american_labor_ticket" text,
"communist_ticket" text,
"socialist_ticket" text
);
Question: Who's the Republican ticket with a Democratic ticket of matthew j. merritt?
<|assistant|>
SELECT "republican_ticket" FROM "1942_state_election_results" WHERE "democratic_ticket"='matthew j. merritt';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_standings" (
"season" real,
"overall" text,
"slalom" text,
"giant_slalom" text,
"super_g" text,
"downhill" text,
"combined" text
);
Question: What is the giant slalom with a 37 super g?
<|assistant|>
SELECT "giant_slalom" FROM "season_standings" WHERE "super_g"='37';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_history" (
"season" text,
"round" text,
"country" text,
"opponent" text,
"result" text
);
Question: What season had a game in the first round with a result of 4–1, 0–1?
<|assistant|>
SELECT "season" FROM "european_history" WHERE "round"='first round' AND "result"='4–1, 0–1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_history" (
"season" text,
"round" text,
"country" text,
"opponent" text,
"result" text
);
Question: What country had an opponent of Sampdoria?
<|assistant|>
SELECT "country" FROM "european_history" WHERE "opponent"='sampdoria';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_history" (
"season" text,
"round" text,
"country" text,
"opponent" text,
"result" text
);
Question: Who was the opponent during the second round?
<|assistant|>
SELECT "opponent" FROM "european_history" WHERE "round"='second round';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_history" (
"season" text,
"round" text,
"country" text,
"opponent" text,
"result" text
);
Question: What was the result of the second round?
<|assistant|>
SELECT "result" FROM "european_history" WHERE "round"='second round';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: What Opponent has an Attendance that is 26,880?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "attendance"='26,880';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" text,
"date" text
);
Question: What nation has a Record of 5.06m(16ft7in)?
<|assistant|>
SELECT "nation" FROM "record_progression" WHERE "record"='5.06m(16ft7in)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" text,
"date" text
);
Question: What is the Date when Russia was the nation and the venue was madrid , spain?
<|assistant|>
SELECT "date" FROM "record_progression" WHERE "nation"='russia' AND "venue"='madrid , spain';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" text,
"date" text
);
Question: What is the Date when yelena isinbayeva was the Athlete, with a Record of 4.90m(16ft0¾in)?
<|assistant|>
SELECT "date" FROM "record_progression" WHERE "athlete"='yelena isinbayeva' AND "record"='4.90m(16ft0¾in)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" text,
"date" text
);
Question: What is the Nation when the Athlete was emma george, and a Record of 4.58m(15ft0¼in)?
<|assistant|>
SELECT "nation" FROM "record_progression" WHERE "athlete"='emma george' AND "record"='4.58m(15ft0¼in)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results" (
"played" text,
"wins" text,
"losses" text,
"tied" text,
"win_pct" text
);
Question: Who tied with 8 losses and 50% wins?
<|assistant|>
SELECT "tied" FROM "summary_of_results" WHERE "losses"='8' AND "win_pct"='50%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results" (
"played" text,
"wins" text,
"losses" text,
"tied" text,
"win_pct" text
);
Question: Which win has a loss of IPL?
<|assistant|>
SELECT "wins" FROM "summary_of_results" WHERE "losses"='ipl';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results" (
"played" text,
"wins" text,
"losses" text,
"tied" text,
"win_pct" text
);
Question: Which win has 38.67% wins?
<|assistant|>
SELECT "wins" FROM "summary_of_results" WHERE "win_pct"='38.67%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results" (
"played" text,
"wins" text,
"losses" text,
"tied" text,
"win_pct" text
);
Question: What percentage of wins has 48 losses?
<|assistant|>
SELECT "win_pct" FROM "summary_of_results" WHERE "losses"='48';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results" (
"played" text,
"wins" text,
"losses" text,
"tied" text,
"win_pct" text
);
Question: What was tied at 15 played?
<|assistant|>
SELECT "tied" FROM "summary_of_results" WHERE "played"='15';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school" text
);
Question: What was the average round for john markham draft pick?
<|assistant|>
SELECT AVG("round") FROM "nfl_draft" WHERE "player"='john markham';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school" text
);
Question: What school did draft pick before 125, will allen go to?
<|assistant|>
SELECT "school" FROM "nfl_draft" WHERE "pick"<125 AND "player"='will allen';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school" text
);
Question: What school did draft pick from round 3 go to?
<|assistant|>
SELECT "school" FROM "nfl_draft" WHERE "round"=3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "topscorers_in_order_of_league_goals" (
"player" text,
"club" text,
"league" real,
"fa_cup" real,
"fa_trophy" real,
"league_cup" real,
"total" real
);
Question: What is the lowest number of FA Trophy matches for a player with a total number of matches under 22 and less than 0 league cups.
<|assistant|>
SELECT MIN("fa_trophy") FROM "topscorers_in_order_of_league_goals" WHERE "total"<22 AND "league_cup"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What is the fewest games lost by Paulistano with more than 39 points?
<|assistant|>
SELECT MIN("lost") FROM "campeonato_paulista" WHERE "team"='paulistano' AND "points">39;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: How many games were played against when the team played more than 22 total?
<|assistant|>
SELECT SUM("against") FROM "campeonato_paulista" WHERE "played">22;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" real,
"played" real,
"drawn" real,
"lost" real,
"against" real,
"difference" text
);
Question: What was the highest number of against when the difference was 58 and the total played was more than 22?
<|assistant|>
SELECT MAX("against") FROM "campeonato_paulista" WHERE "difference"='58' AND "played">22;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_basketball_association" (
"year" real,
"winning_team" text,
"losing_team" text,
"score" text,
"site" text
);
Question: What is the Score with a Winning team that is san antonio spurs?
<|assistant|>
SELECT "score" FROM "national_basketball_association" WHERE "winning_team"='san antonio spurs';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: Which Result has an Attendance of 60,705?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "attendance"='60,705';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: How many Weeks have a Result of w 17–13?
<|assistant|>
SELECT AVG("week") FROM "schedule" WHERE "result"='w 17–13';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: Which Opponent that has a Week larger than 3 on october 6, 1991?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week">3 AND "date"='october 6, 1991';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: When has Attendances of 45,795?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "attendance"='45,795';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" text
);
Question: In what Week has a Result of l 24–20, and a Opponent of at new england patriots?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "result"='l 24–20' AND "opponent"='at new england patriots';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" real,
"goals" real
);
Question: What years were the goals less then 160?
<|assistant|>
SELECT "years" FROM "list_of_top_association_football_goal_sc" WHERE "goals"<160;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What is the IATA code for the airport with an ICAO code of HLLS?
<|assistant|>
SELECT "iata" FROM "destinations" WHERE "icao"='hlls';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What airport is in Sabha?
<|assistant|>
SELECT "airport" FROM "destinations" WHERE "city"='sabha';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What is the ICAO code for the airport with RBA as its IATA code?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "iata"='rba';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: What country is Istanbul in?
<|assistant|>
SELECT "country" FROM "destinations" WHERE "city"='istanbul';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "destinations" (
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text
);
Question: Which airport has SEB as its IATA code?
<|assistant|>
SELECT "airport" FROM "destinations" WHERE "iata"='seb';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
Question: What position does the player from Winston-Salem State play?
<|assistant|>
SELECT "position" FROM "nfl_draft" WHERE "school_club_team"='winston-salem state';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"draw" real,
"song" text,
"performer" text,
"points" real,
"rank" text
);
Question: What was the sum of the points for the song "why did you have to go?"
<|assistant|>
SELECT SUM("points") FROM "references" WHERE "song"='\"why did you have to go?\"';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"draw" real,
"song" text,
"performer" text,
"points" real,
"rank" text
);
Question: What is the total number of points for the song that was ranked 6th and had a draw number smaller than 5?
<|assistant|>
SELECT COUNT("points") FROM "references" WHERE "rank"='6th' AND "draw"<5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_m_feet" text,
"floors" real,
"year" real
);
Question: When was the average year that the number of floors was greater than 75?
<|assistant|>
SELECT AVG("year") FROM "tallest_buildings" WHERE "floors">75;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tallest_buildings" (
"rank" text,
"name" text,
"height_m_feet" text,
"floors" real,
"year" real
);
Question: What is the average number of floors of the Venetian tower?
<|assistant|>
SELECT AVG("floors") FROM "tallest_buildings" WHERE "name"='venetian tower';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "teams" (
"club" text,
"home_town" text,
"arena" text,
"founded" real,
"rank" text
);
Question: Which arena was founded in 2000?
<|assistant|>
SELECT "arena" FROM "teams" WHERE "founded"=2000;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" text,
"goals" real
);
Question: Can you tell me the total number of Rank that has the Matches of 427, and the Goals smaller than 320?
<|assistant|>
SELECT COUNT("rank") FROM "list_of_top_association_football_goal_sc" WHERE "matches"='427' AND "goals"<320;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" text,
"goals" real
);
Question: Can you tell me the Matches that has the Rank of 1?
<|assistant|>
SELECT "matches" FROM "list_of_top_association_football_goal_sc" WHERE "rank"=1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_top_association_football_goal_sc" (
"rank" real,
"name" text,
"years" text,
"matches" text,
"goals" real
);
Question: Can you tell me the Matches that has the Rank smaller than 6, and the Years of 1943-62?
<|assistant|>
SELECT "matches" FROM "list_of_top_association_football_goal_sc" WHERE "rank"<6 AND "years"='1943-62';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_fleet" (
"class" text,
"type" text,
"built" text,
"number" real,
"withdrawn" real
);
Question: Which class had a number under 4 and was built in 1988?
<|assistant|>
SELECT "class" FROM "past_fleet" WHERE "number"<4 AND "built"='1988';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_fleet" (
"class" text,
"type" text,
"built" text,
"number" real,
"withdrawn" real
);
Question: How many items withdrawn had numbers over 5?
<|assistant|>
SELECT COUNT("withdrawn") FROM "past_fleet" WHERE "number">5;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_fleet" (
"class" text,
"type" text,
"built" text,
"number" real,
"withdrawn" real
);
Question: What is the sum of numbers that had a type of Driving Van Trailer?
<|assistant|>
SELECT SUM("number") FROM "past_fleet" WHERE "type"='driving van trailer';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ice_dancing" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What rank has 1 silver, more than 2 gold, and a total larger than 3?
<|assistant|>
SELECT COUNT("rank") FROM "ice_dancing" WHERE "silver"=1 AND "total">3 AND "gold">2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ice_dancing" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the most gold where silver is 0?
<|assistant|>
SELECT MAX("gold") FROM "ice_dancing" WHERE "silver"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ice_dancing" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the number of silver where the rank is higher than 4 and bronze is smaller than 1?
<|assistant|>
SELECT COUNT("silver") FROM "ice_dancing" WHERE "rank">4 AND "bronze"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ice_dancing" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the rank where the gold is 0?
<|assistant|>
SELECT AVG("rank") FROM "ice_dancing" WHERE "gold"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ice_dancing" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the rank that has 1 bronze and 1 silver?
<|assistant|>
SELECT COUNT("rank") FROM "ice_dancing" WHERE "bronze"=1 AND "silver">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellites_by_block" (
"block" text,
"launched" real,
"operational" real,
"not_usable" real,
"retired" real,
"launch_failures" real
);
Question: What is the total launch failures when there are 4 launches, and the not usable is greater than 0?
<|assistant|>
SELECT SUM("launch_failures") FROM "satellites_by_block" WHERE "launched"=4 AND "not_usable">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellites_by_block" (
"block" text,
"launched" real,
"operational" real,
"not_usable" real,
"retired" real,
"launch_failures" real
);
Question: What is the highest number of not usable satellites when there are more than 0 launch failures, less than 30 retired, and the block is I?
<|assistant|>
SELECT MAX("not_usable") FROM "satellites_by_block" WHERE "launch_failures">0 AND "retired"<30 AND "block"='block i';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "satellites_by_block" (
"block" text,
"launched" real,
"operational" real,
"not_usable" real,
"retired" real,
"launch_failures" real
);
Question: What is the average number of not usable satellited when there are 0 retired, and the launch failures are less than 1?
<|assistant|>
SELECT AVG("not_usable") FROM "satellites_by_block" WHERE "retired"=0 AND "launch_failures"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition_of_the_5th_seanad" (
"administrative_panel" real,
"agricultural_panel" real,
"cultural_and_educational_panel" real,
"industrial_and_commercial_panel" real,
"labour_panel" real,
"national_university_of_ireland" real,
"university_of_dublin" real,
"nominated_by_the_taoiseach" real,
"total" real
);
Question: What is the lowest number of members on the Cultural and Educational Panel, when the University of Dublin had 3 members, when the Industrial and Commercial Panel had more than 0 members, and when the Agricultural Panel had more than 4 members?
<|assistant|>
SELECT MIN("cultural_and_educational_panel") FROM "composition_of_the_5th_seanad" WHERE "university_of_dublin"<3 AND "industrial_and_commercial_panel">0 AND "agricultural_panel">4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition_of_the_5th_seanad" (
"administrative_panel" real,
"agricultural_panel" real,
"cultural_and_educational_panel" real,
"industrial_and_commercial_panel" real,
"labour_panel" real,
"national_university_of_ireland" real,
"university_of_dublin" real,
"nominated_by_the_taoiseach" real,
"total" real
);
Question: What was the average number of members Nominated by the Taoiseach, when the Agricultural Panel had less than 1 member, and when the Administrative Panel had fewer than 0 members?
<|assistant|>
SELECT AVG("nominated_by_the_taoiseach") FROM "composition_of_the_5th_seanad" WHERE "agricultural_panel"<1 AND "administrative_panel"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition_of_the_5th_seanad" (
"administrative_panel" real,
"agricultural_panel" real,
"cultural_and_educational_panel" real,
"industrial_and_commercial_panel" real,
"labour_panel" real,
"national_university_of_ireland" real,
"university_of_dublin" real,
"nominated_by_the_taoiseach" real,
"total" real
);
Question: What was the lowest number of members on the Agricultural Panel, when the Industrial and Commercial Panel had 9 members, and when the National University of Ireland had more than 3 members?
<|assistant|>
SELECT MIN("agricultural_panel") FROM "composition_of_the_5th_seanad" WHERE "industrial_and_commercial_panel"=9 AND "national_university_of_ireland">3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "composition_of_the_5th_seanad" (
"administrative_panel" real,
"agricultural_panel" real,
"cultural_and_educational_panel" real,
"industrial_and_commercial_panel" real,
"labour_panel" real,
"national_university_of_ireland" real,
"university_of_dublin" real,
"nominated_by_the_taoiseach" real,
"total" real
);
Question: What was the greatest number of members for the National University of Ireland, when the Total number of members in the Seanad was 60, and when the Administrative Panel had more than 7 members?
<|assistant|>
SELECT MAX("national_university_of_ireland") FROM "composition_of_the_5th_seanad" WHERE "total"=60 AND "administrative_panel">7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "contestants" (
"pos" text,
"player" text,
"team" text,
"height" text,
"weight" real,
"first_round" real,
"final_round" text
);
Question: What is Final round, when Player is Danilo Gallinari?
<|assistant|>
SELECT "final_round" FROM "contestants" WHERE "player"='danilo gallinari';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"title" text,
"director" text,
"producer" text,
"production_cost" text,
"singapore_gross" text
);
Question: For the film with director listed as 1998, what was the gross in Singapore?
<|assistant|>
SELECT "singapore_gross" FROM "1990s" WHERE "director"='1998';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"title" text,
"director" text,
"producer" text,
"production_cost" text,
"singapore_gross" text
);
Question: Who was the director for the film produced by River Films?
<|assistant|>
SELECT "director" FROM "1990s" WHERE "producer"='river films';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"title" text,
"director" text,
"producer" text,
"production_cost" text,
"singapore_gross" text
);
Question: Who was the producer for the film directed by 1998?
<|assistant|>
SELECT "producer" FROM "1990s" WHERE "director"='1998';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"title" text,
"director" text,
"producer" text,
"production_cost" text,
"singapore_gross" text
);
Question: For the film titled 1997, what was the gross in Singapore?
<|assistant|>
SELECT "singapore_gross" FROM "1990s" WHERE "title"='1997';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.