text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "recent_government_budget_balances" (
"year" real,
"income" real,
"expenditure" real,
"surplus_deficit" text,
"pct_gdp" text
);
Question: Which Year has an Expenditure of 55, and an Income smaller than 36.2?
<|assistant|>
SELECT MIN("year") FROM "recent_government_budget_balances" WHERE "expenditure"=55 AND "income"<36.2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "recent_government_budget_balances" (
"year" real,
"income" real,
"expenditure" real,
"surplus_deficit" text,
"pct_gdp" text
);
Question: Which % GDP has a Year smaller than 2011, and an Expenditure larger than 41.3, and an Income smaller than 48, and a Surplus(Deficit) of (24.6)?
<|assistant|>
SELECT "pct_gdp" FROM "recent_government_budget_balances" WHERE "year"<2011 AND "expenditure">41.3 AND "income"<48 AND "surplus_deficit"='(24.6)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"tournament_name" text,
"champions" text,
"runners_up" text,
"score" text
);
Question: What year was the Grand Prix Passing Shot Bordeaux that had Runners-up of Diego Nargiso?
<|assistant|>
SELECT "year" FROM "singles" WHERE "tournament_name"='grand prix passing shot bordeaux' AND "runners_up"='diego nargiso';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"tournament_name" text,
"champions" text,
"runners_up" text,
"score" text
);
Question: What tournament had a score of 5–7, 6–4, 6–4?
<|assistant|>
SELECT "tournament_name" FROM "singles" WHERE "score"='5–7, 6–4, 6–4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"tournament_name" text,
"champions" text,
"runners_up" text,
"score" text
);
Question: After 1989, what was the score of the Grand Prix Passing Shot where the Runners-up were Jeff Tarango?
<|assistant|>
SELECT "score" FROM "singles" WHERE "year">1989 AND "tournament_name"='grand prix passing shot' AND "runners_up"='jeff tarango';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles" (
"year" real,
"tournament_name" text,
"champions" text,
"runners_up" text,
"score" text
);
Question: What's the name of the tournament that Gianni Ocleppo was the runner-up?
<|assistant|>
SELECT "tournament_name" FROM "singles" WHERE "runners_up"='gianni ocleppo';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season_results" (
"season" text,
"wins" real,
"losses" real,
"winpct" real,
"games_behind" text,
"playoffs" text,
"results" text
);
Question: What is the lowest percentage of wins for 6½ games and more than 77 total wins?
<|assistant|>
SELECT MIN("winpct") FROM "regular_season_results" WHERE "games_behind"='6½' AND "wins">77;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text
);
Question: What is the score of the competition on November 10?
<|assistant|>
SELECT "score" FROM "november" WHERE "date"='november 10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text
);
Question: Who is the visitor when the record is 2-1?
<|assistant|>
SELECT "visitor" FROM "november" WHERE "record"='2-1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "november" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" text,
"record" text
);
Question: Who is the home team when the score is 81-80?
<|assistant|>
SELECT "home" FROM "november" WHERE "score"='81-80';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table_unofficial" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many Gold medals did Japan receive who had a Total of more than 1 medals?
<|assistant|>
SELECT SUM("gold") FROM "medal_table_unofficial" WHERE "nation"='japan' AND "total">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"time_cst" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"nfl_recap" text
);
Question: What time (cst) has and NFL recap of recap with october 19, 2008 as the date?
<|assistant|>
SELECT "time_cst" FROM "schedule" WHERE "nfl_recap"='recap' AND "date"='october 19, 2008';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"time_cst" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"nfl_recap" text
);
Question: Which week has giants stadium as the game site?
<|assistant|>
SELECT "week" FROM "schedule" WHERE "game_site"='giants stadium';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"time_cst" text,
"opponent" text,
"result" text,
"game_site" text,
"record" text,
"nfl_recap" text
);
Question: What is the lowest week that has 7:15 p.m. as the time (cst) and fedexfield as the game site?
<|assistant|>
SELECT MIN("week") FROM "schedule" WHERE "time_cst"='7:15 p.m.' AND "game_site"='fedexfield';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_state_election_results" (
"office" text,
"democratic_ticket" text,
"republican_ticket" text,
"socialist_ticket" text,
"constitutional_ticket" text,
"law_preservation_ticket" text
);
Question: What office was law preservation ticket holder William E. Barron running for?
<|assistant|>
SELECT "office" FROM "1934_state_election_results" WHERE "law_preservation_ticket"='william e. barron';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_state_election_results" (
"office" text,
"democratic_ticket" text,
"republican_ticket" text,
"socialist_ticket" text,
"constitutional_ticket" text,
"law_preservation_ticket" text
);
Question: Who was the constitutional ticken when Charles B. Sears was the republican ticket?
<|assistant|>
SELECT "constitutional_ticket" FROM "1934_state_election_results" WHERE "republican_ticket"='charles b. sears';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1934_state_election_results" (
"office" text,
"democratic_ticket" text,
"republican_ticket" text,
"socialist_ticket" text,
"constitutional_ticket" text,
"law_preservation_ticket" text
);
Question: Who was the constitutional ticket when william karlin was the socialist ticket?
<|assistant|>
SELECT "constitutional_ticket" FROM "1934_state_election_results" WHERE "socialist_ticket"='william karlin';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pga_tour_wins_10" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_up" text
);
Question: What was the margin of victory on Mar 18, 1979?
<|assistant|>
SELECT "margin_of_victory" FROM "pga_tour_wins_10" WHERE "date"='mar 18, 1979';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
Question: What is the comp for the year 1989?
<|assistant|>
SELECT "comp" FROM "regular_season" WHERE "year"='1989';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
Question: What is the team in 1989?
<|assistant|>
SELECT "team" FROM "regular_season" WHERE "year"='1989';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
Question: What is the RAtt in the year 1988?
<|assistant|>
SELECT "r_att" FROM "regular_season" WHERE "year"='1988';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
Question: What was the team with a Ratt of 42?
<|assistant|>
SELECT "team" FROM "regular_season" WHERE "r_att"='42';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"year" text,
"team" text,
"comp" text,
"rate" text,
"r_att" text,
"r_yds" text,
"r_avg" text
);
Question: What was the team with a ratt of 57?
<|assistant|>
SELECT "team" FROM "regular_season" WHERE "r_att"='57';<|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,
"game_site" text,
"attendance" real
);
Question: Who did the Giants play before week 7 in Tulane Stadium?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"<7 AND "game_site"='tulane stadium';<|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,
"game_site" text,
"attendance" real
);
Question: What was the lowest attendance for week 1?
<|assistant|>
SELECT MIN("attendance") FROM "schedule" WHERE "week"=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,
"player" text,
"country" text,
"goals" real,
"years" text
);
Question: What is the highest rank of a player from Ethiopia?
<|assistant|>
SELECT MAX("rank") FROM "list_of_top_association_football_goal_sc" WHERE "country"='ethiopia';<|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: How many ranks had 367 matches and more than 216 goals?
<|assistant|>
SELECT SUM("rank") FROM "list_of_top_association_football_goal_sc" WHERE "matches"=367 AND "goals">216;<|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 mean rank number when goals are 230 and there are more than 535?
<|assistant|>
SELECT AVG("rank") FROM "list_of_top_association_football_goal_sc" WHERE "goals"=230 AND "matches">535;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "viewing_figures" (
"episode_number" real,
"season" text,
"original_airing" text,
"total_viewers" text,
"audience_share_average" text,
"season_viewer_average" text
);
Question: Where the audience share is 8%, what is the original airing?
<|assistant|>
SELECT "original_airing" FROM "viewing_figures" WHERE "audience_share_average"='8%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "viewing_figures" (
"episode_number" real,
"season" text,
"original_airing" text,
"total_viewers" text,
"audience_share_average" text,
"season_viewer_average" text
);
Question: For episode number 2 what is the season viewer average?
<|assistant|>
SELECT "season_viewer_average" FROM "viewing_figures" WHERE "episode_number"=2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "viewing_figures" (
"episode_number" real,
"season" text,
"original_airing" text,
"total_viewers" text,
"audience_share_average" text,
"season_viewer_average" text
);
Question: What episode number has an audience share of 10%?
<|assistant|>
SELECT COUNT("episode_number") FROM "viewing_figures" WHERE "audience_share_average"='10%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "peter_drummond_1911_1918" (
"class" text,
"wheels" real,
"date" text,
"builder" text,
"no_built" real,
"1919_nos" text,
"lms_class" text,
"lms_nos" text
);
Question: What is the value for the item "Class" when the value of the item "Wheels" is 137?
<|assistant|>
SELECT "class" FROM "peter_drummond_1911_1918" WHERE "wheels"=137;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rebounds" (
"rank" real,
"name" text,
"team" text,
"games" real,
"rebounds" real
);
Question: What's the smallest number of games for the fenerbahçe team?
<|assistant|>
SELECT MIN("games") FROM "rebounds" WHERE "team"='fenerbahçe';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rebounds" (
"rank" real,
"name" text,
"team" text,
"games" real,
"rebounds" real
);
Question: What's the mean game number for the olympiacos team when there's less than 17 rebounds?
<|assistant|>
SELECT AVG("games") FROM "rebounds" WHERE "team"='olympiacos' AND "rebounds"<17;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rebounds" (
"rank" real,
"name" text,
"team" text,
"games" real,
"rebounds" real
);
Question: How many games does novica veličković have when there's more than 24 rebounds?
<|assistant|>
SELECT COUNT("games") FROM "rebounds" WHERE "name"='novica veličković' AND "rebounds">24;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year_record" (
"year" text,
"league" text,
"reg_season" text,
"playoffs" text,
"lost" real
);
Question: What is the League with a Year that is 1990/91?
<|assistant|>
SELECT "league" FROM "year_by_year_record" WHERE "year"='1990/91';<|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 for simferopol international airport?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "airport"='simferopol international airport';<|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 country has an IATA of gzt?
<|assistant|>
SELECT "country" FROM "destinations" WHERE "iata"='gzt';<|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 Yerevan located in?
<|assistant|>
SELECT "country" FROM "destinations" WHERE "city"='yerevan';<|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 when the IATA is ika?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "iata"='ika';<|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 when the IATA is ist?
<|assistant|>
SELECT "icao" FROM "destinations" WHERE "iata"='ist';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_league" (
"team" text,
"match" real,
"points" real,
"draw" real,
"lost" real
);
Question: Which team has 10 losses?
<|assistant|>
SELECT "team" FROM "first_league" WHERE "lost"=10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "brazil_s_15_busiest_airports_by_passenge" (
"rank" real,
"location" text,
"total_passengers" real,
"annual_change" text,
"capacity_in_use" text
);
Question: In which yearly change was there a capacity of 78.4% and a rank smaller than 3?
<|assistant|>
SELECT "annual_change" FROM "brazil_s_15_busiest_airports_by_passenge" WHERE "rank"<3 AND "capacity_in_use"='78.4%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "brazil_s_15_busiest_airports_by_passenge" (
"rank" real,
"location" text,
"total_passengers" real,
"annual_change" text,
"capacity_in_use" text
);
Question: In Which rank was there a location of porto alegre?
<|assistant|>
SELECT "rank" FROM "brazil_s_15_busiest_airports_by_passenge" WHERE "location"='porto alegre';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "brazil_s_15_busiest_airports_by_passenge" (
"rank" real,
"location" text,
"total_passengers" real,
"annual_change" text,
"capacity_in_use" text
);
Question: what is the number of passengers when the capacity is 81.2%?
<|assistant|>
SELECT SUM("total_passengers") FROM "brazil_s_15_busiest_airports_by_passenge" WHERE "capacity_in_use"='81.2%';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "brazil_s_15_busiest_airports_by_passenge" (
"rank" real,
"location" text,
"total_passengers" real,
"annual_change" text,
"capacity_in_use" text
);
Question: what is the highest amount of passengers when there is a rank of 1?
<|assistant|>
SELECT MAX("total_passengers") FROM "brazil_s_15_busiest_airports_by_passenge" WHERE "rank"=1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "brazil_s_15_busiest_airports_by_passenge" (
"rank" real,
"location" text,
"total_passengers" real,
"annual_change" text,
"capacity_in_use" text
);
Question: Which highest rank had an annual change of 10.3% and a capacity of people smaller than 1,368,968?
<|assistant|>
SELECT MAX("rank") FROM "brazil_s_15_busiest_airports_by_passenge" WHERE "annual_change"='10.3%' AND "total_passengers"<'1,368,968';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the latest Week on which the Result was l 17–0?
<|assistant|>
SELECT MAX("week") FROM "season_schedule" WHERE "result"='l 17–0';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
Question: What is the average cuts made at the top 25, less than 10, and at the Top 10 more than 3?
<|assistant|>
SELECT AVG("cuts_made") FROM "summary" WHERE "top_25"<10 AND "top_10">3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
Question: What is average Top 10 with 0 wins?
<|assistant|>
SELECT AVG("top_10") FROM "summary" WHERE "wins"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
Question: What is the average event for the Open Championship Tournament, and a Top-5 less than 1?
<|assistant|>
SELECT AVG("events") FROM "summary" WHERE "tournament"='the open championship' AND "top_5"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"tournament" text,
"wins" real,
"top_5" real,
"top_10" real,
"top_25" real,
"events" real,
"cuts_made" real
);
Question: What is the average wins has Top-25 less than 0?
<|assistant|>
SELECT AVG("wins") FROM "summary" WHERE "top_25"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the largest Against with a Byes larger than 0?
<|assistant|>
SELECT MAX("against") FROM "2012_ladder" WHERE "byes">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: Which Wins has an Against of 1940, and a Byes larger than 0?
<|assistant|>
SELECT MAX("wins") FROM "2012_ladder" WHERE "against"=1940 AND "byes">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: Which Draws has a Wins of 10, and a Peel of south mandurah, and a Byes larger than 0?
<|assistant|>
SELECT AVG("draws") FROM "2012_ladder" WHERE "wins"=10 AND "peel"='south mandurah' AND "byes">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: Which Against has a Draws larger than 0, a Losses smaller than 16, and a Wins smaller than 4?
<|assistant|>
SELECT MAX("against") FROM "2012_ladder" WHERE "draws">0 AND "losses"<16 AND "wins"<4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: Which Losses has an Against of 1101, and a Byes smaller than 0?
<|assistant|>
SELECT COUNT("losses") FROM "2012_ladder" WHERE "against"=1101 AND "byes"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_ladder" (
"peel" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: Which Byes has a Losses smaller than 1?
<|assistant|>
SELECT MAX("byes") FROM "2012_ladder" WHERE "losses"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "points" (
"rank" real,
"name" text,
"team" text,
"games" real,
"points" real
);
Question: What is the average number of games of the player with a rank less than 1?
<|assistant|>
SELECT AVG("games") FROM "points" WHERE "rank"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "points" (
"rank" real,
"name" text,
"team" text,
"games" real,
"points" real
);
Question: What is the highest rank of the player with less than 32 points?
<|assistant|>
SELECT MAX("rank") FROM "points" WHERE "points"<32;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "points" (
"rank" real,
"name" text,
"team" text,
"games" real,
"points" real
);
Question: What is the rank of the player with less than 34 points?
<|assistant|>
SELECT SUM("rank") FROM "points" WHERE "points"<34;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's Fourth District has a Second District of bob springstead?
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "second_district"='bob springstead';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's the First District with a Fifth District of prudy adam?
<|assistant|>
SELECT "first_district" FROM "current_members" WHERE "fifth_district"='prudy adam';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's the Fourth District with a First District of beverly bodem?
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "first_district"='beverly bodem';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's the Fourth District with a Second District of kurt van koevering?
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "second_district"='kurt van koevering';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's the Fifth District with a Second District of paul leidig?
<|assistant|>
SELECT "fifth_district" FROM "current_members" WHERE "second_district"='paul leidig';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "current_members" (
"first_district" text,
"second_district" text,
"third_district" text,
"fourth_district" text,
"fifth_district" text
);
Question: Who's the Fourth District with a Third District of sharon yentsch?
<|assistant|>
SELECT "fourth_district" FROM "current_members" WHERE "third_district"='sharon yentsch';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "men" (
"aces" real,
"player" text,
"opponent" text,
"event" text,
"sets" real
);
Question: How many Sets did Gary Muller have?
<|assistant|>
SELECT COUNT("sets") FROM "men" WHERE "player"='gary muller';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "men" (
"aces" real,
"player" text,
"opponent" text,
"event" text,
"sets" real
);
Question: What Player in 2005 Wimbledon had less than 5 Sets?
<|assistant|>
SELECT "player" FROM "men" WHERE "sets"<5 AND "event"='2005 wimbledon';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "men" (
"aces" real,
"player" text,
"opponent" text,
"event" text,
"sets" real
);
Question: At the 2001 Davis Cup, what Opponent had less than 50 Aces?
<|assistant|>
SELECT "opponent" FROM "men" WHERE "aces"<50 AND "event"='2001 davis cup';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_kingdom" (
"episode_number" real,
"title" text,
"original_airing_on_channel_4" text,
"time_of_airing_on_channel_4" text,
"original_airing_on_e4" text,
"time_of_airing_on_e4" text,
"position_in_channel_4_and_channel_4_1_s_ratings" text,
"position_in_e4_and_e4_1_s_ratings" text
);
Question: What is Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200?
<|assistant|>
SELECT "position_in_channel_4_and_channel_4_1_s_ratings" FROM "united_kingdom" WHERE "position_in_e4_and_e4_1_s_ratings"='780,200';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_kingdom" (
"episode_number" real,
"title" text,
"original_airing_on_channel_4" text,
"time_of_airing_on_channel_4" text,
"original_airing_on_e4" text,
"time_of_airing_on_e4" text,
"position_in_channel_4_and_channel_4_1_s_ratings" text,
"position_in_e4_and_e4_1_s_ratings" text
);
Question: What time did Channel 4 air an episode number larger than 106 with the title of Marry Me A Little?
<|assistant|>
SELECT "time_of_airing_on_channel_4" FROM "united_kingdom" WHERE "episode_number">106 AND "title"='marry me a little';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"month_year" text,
"sunk_by_u_boat" real,
"sunk_by_aircraft" real,
"sunk_by_warship_or_raider" real,
"sunk_by_mines" real,
"german_submarines_lost" real
);
Question: What is the total number of sunk by U-boats with less than 2 German submarines lost, 56328 sunk by aircrafts, and more than 8269 sunk by mines?
<|assistant|>
SELECT COUNT("sunk_by_u_boat") FROM "references" WHERE "german_submarines_lost"<2 AND "sunk_by_aircraft"=56328 AND "sunk_by_mines">8269;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"month_year" text,
"sunk_by_u_boat" real,
"sunk_by_aircraft" real,
"sunk_by_warship_or_raider" real,
"sunk_by_mines" real,
"german_submarines_lost" real
);
Question: What is the total number sunk by warship or raider with 20 German submarines lost and more than 21616 sunk by aircraft?
<|assistant|>
SELECT COUNT("sunk_by_warship_or_raider") FROM "references" WHERE "german_submarines_lost"=20 AND "sunk_by_aircraft">21616;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"month_year" text,
"sunk_by_u_boat" real,
"sunk_by_aircraft" real,
"sunk_by_warship_or_raider" real,
"sunk_by_mines" real,
"german_submarines_lost" real
);
Question: What is the total number of German submarines lost with more than 120958 sunk by mines?
<|assistant|>
SELECT COUNT("german_submarines_lost") FROM "references" WHERE "sunk_by_mines">120958;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"month_year" text,
"sunk_by_u_boat" real,
"sunk_by_aircraft" real,
"sunk_by_warship_or_raider" real,
"sunk_by_mines" real,
"german_submarines_lost" real
);
Question: What is the month and year less than 5 German submarines were lost, less than 6893 were sunk by warship or raider, less than 133746 were sunk by aircraft, and more than 111263 were sunk by U-boat?
<|assistant|>
SELECT "month_year" FROM "references" WHERE "german_submarines_lost"<5 AND "sunk_by_warship_or_raider"<6893 AND "sunk_by_aircraft"<133746 AND "sunk_by_u_boat">111263;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"month_year" text,
"sunk_by_u_boat" real,
"sunk_by_aircraft" real,
"sunk_by_warship_or_raider" real,
"sunk_by_mines" real,
"german_submarines_lost" real
);
Question: What is the month and year less than 106005 were sunk by aircraft and 61857 were sunk by warship or raider?
<|assistant|>
SELECT "month_year" FROM "references" WHERE "sunk_by_aircraft"<106005 AND "sunk_by_warship_or_raider"=61857;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces_of_joseon" (
"rr_romaja" text,
"m_r_romaja" text,
"hangul" text,
"hanja" text,
"name_origin" text,
"capital" text,
"region" text,
"korean_dialect" text,
"post_1896_provinces" text
);
Question: What is the post-1986 provinces with a 全羅道 Hanja?
<|assistant|>
SELECT "post_1896_provinces" FROM "provinces_of_joseon" WHERE "hanja"='全羅道';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces_of_joseon" (
"rr_romaja" text,
"m_r_romaja" text,
"hangul" text,
"hanja" text,
"name_origin" text,
"capital" text,
"region" text,
"korean_dialect" text,
"post_1896_provinces" text
);
Question: What is the Korean dialect in the daegu capital?
<|assistant|>
SELECT "korean_dialect" FROM "provinces_of_joseon" WHERE "capital"='daegu';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces_of_joseon" (
"rr_romaja" text,
"m_r_romaja" text,
"hangul" text,
"hanja" text,
"name_origin" text,
"capital" text,
"region" text,
"korean_dialect" text,
"post_1896_provinces" text
);
Question: What is the Korean dialect with a jeolla RR Romaja?
<|assistant|>
SELECT "korean_dialect" FROM "provinces_of_joseon" WHERE "rr_romaja"='jeolla';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "provinces_of_joseon" (
"rr_romaja" text,
"m_r_romaja" text,
"hangul" text,
"hanja" text,
"name_origin" text,
"capital" text,
"region" text,
"korean_dialect" text,
"post_1896_provinces" text
);
Question: What is the Hanja for the hamgyeong RR Romaja?
<|assistant|>
SELECT "hanja" FROM "provinces_of_joseon" WHERE "rr_romaja"='hamgyeong';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states" (
"name" text,
"level" real,
"digits" real,
"average_size_square_miles" text,
"number_of_h_us_approximate" real,
"example_name" text,
"example_code_huc" real
);
Question: What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels?
<|assistant|>
SELECT AVG("example_code_huc") FROM "united_states" WHERE "example_name"='lower snake' AND "digits"=6 AND "level"<3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states" (
"name" text,
"level" real,
"digits" real,
"average_size_square_miles" text,
"number_of_h_us_approximate" real,
"example_name" text,
"example_code_huc" real
);
Question: What's the approximate number of HUs when there are more than 2 digits, and 6 levels?
<|assistant|>
SELECT COUNT("number_of_h_us_approximate") FROM "united_states" WHERE "digits">2 AND "level"=6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states" (
"name" text,
"level" real,
"digits" real,
"average_size_square_miles" text,
"number_of_h_us_approximate" real,
"example_name" text,
"example_code_huc" real
);
Question: How many HUC example codes have 1 level?
<|assistant|>
SELECT COUNT("example_code_huc") FROM "united_states" WHERE "level"=1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states" (
"name" text,
"level" real,
"digits" real,
"average_size_square_miles" text,
"number_of_h_us_approximate" real,
"example_name" text,
"example_code_huc" real
);
Question: What is the mean level number when the example name is lower snake and the approximate number is hus is less than 370?
<|assistant|>
SELECT AVG("level") FROM "united_states" WHERE "example_name"='lower snake' AND "number_of_h_us_approximate"<370;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004_ladder" (
"ballarat_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the losses average when the against is greater than 1255 and wins is 0 and the draws less than 0?
<|assistant|>
SELECT AVG("losses") FROM "2004_ladder" WHERE "against">1255 AND "wins"=0 AND "draws"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004_ladder" (
"ballarat_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the smallest losses when the wins are 5 and the against less than 1852?
<|assistant|>
SELECT MIN("losses") FROM "2004_ladder" WHERE "wins"=5 AND "against"<1852;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004_ladder" (
"ballarat_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the total against that has wins less than 9, and losses less than 16, and 2 as the byes, and Ballarat FL of ballarat?
<|assistant|>
SELECT SUM("against") FROM "2004_ladder" WHERE "wins"<9 AND "losses"<16 AND "byes"=2 AND "ballarat_fl"='ballarat';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004_ladder" (
"ballarat_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the fewest losses that Ballarat FL of Lake Wendouree has when the wins are smaller than 9?
<|assistant|>
SELECT MIN("losses") FROM "2004_ladder" WHERE "ballarat_fl"='lake wendouree' AND "wins"<9;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2004_ladder" (
"ballarat_fl" text,
"wins" real,
"byes" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the smallest byes when the wins are 3?
<|assistant|>
SELECT MIN("byes") FROM "2004_ladder" WHERE "wins"=3;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "stations" (
"station" text,
"year_opened" text,
"metropolitan_borough_c" text,
"zone" real,
"station_users_2006_07" real,
"station_users_2007_08" real
);
Question: Can you tell me the total number of Zone than has the Station users 2007-08 larger than 243,800, and the Year opened of 1855?
<|assistant|>
SELECT COUNT("zone") FROM "stations" WHERE "station_users_2007_08">'243,800' AND "year_opened"='1855';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
Question: What is the highest Attendance when the away team was Wrexham?
<|assistant|>
SELECT MAX("attendance") FROM "second_round_proper" WHERE "away_team"='wrexham';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
Question: What is the Away team when the home team was wycombe wanderers?
<|assistant|>
SELECT "away_team" FROM "second_round_proper" WHERE "home_team"='wycombe wanderers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
Question: What is the lowest Attendance when the home team was slough town?
<|assistant|>
SELECT MIN("attendance") FROM "second_round_proper" WHERE "home_team"='slough town';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "second_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" real
);
Question: What is the sum of Attendance when macclesfield town was the way team?
<|assistant|>
SELECT SUM("attendance") FROM "second_round_proper" WHERE "away_team"='macclesfield town';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio_singles" (
"single" text,
"ccm_chart" text,
"debut" text,
"peak_date" text,
"peak_pos" real,
"total_wks" real,
"spins_since_1998_source_mediabase" real
);
Question: How many Spins sources have a CCM Chart of CHR with a peak position less than 1?
<|assistant|>
SELECT COUNT("spins_since_1998_source_mediabase") FROM "radio_singles" WHERE "ccm_chart"='chr' AND "peak_pos"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "radio_singles" (
"single" text,
"ccm_chart" text,
"debut" text,
"peak_date" text,
"peak_pos" real,
"total_wks" real,
"spins_since_1998_source_mediabase" real
);
Question: What CCM Chart had 18 total weeks?
<|assistant|>
SELECT "ccm_chart" FROM "radio_singles" WHERE "total_wks"=18;<|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" real
);
Question: What is Opponent, when Date is December 18, 1988?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "date"='december 18, 1988';<|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" real
);
Question: What is Attendance, when Opponent is Pittsburgh Steelers?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "opponent"='pittsburgh steelers';<|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" real
);
Question: What is the average Week, when Result is l 37–34?
<|assistant|>
SELECT AVG("week") FROM "schedule" WHERE "result"='l 37–34';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.