text
stringlengths 310
1.28k
|
|---|
<|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,
"record" text,
"attendance" real
);
Question: Where did they play the San Diego Chargers?
<|assistant|>
SELECT "game_site" FROM "schedule" WHERE "opponent"='San Diego Chargers';<|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,
"record" text,
"attendance" real
);
Question: How many times during the season were the seahawks 8-6?
<|assistant|>
SELECT COUNT("result") FROM "schedule" WHERE "record"='8-6';<|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,
"record" text,
"attendance" real
);
Question: On what day was the team playing at milwaukee county stadium?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "game_site"='Milwaukee County 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,
"record" text,
"attendance" real
);
Question: How many times did the team play at oakland-alameda county coliseum?
<|assistant|>
SELECT COUNT("date") FROM "schedule" WHERE "game_site"='Oakland-Alameda County Coliseum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13301516_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
Question: Which episode was watched by 11.75 million U.S. viewers?
<|assistant|>
SELECT "title" FROM "table1_13301516_1" WHERE "u_s_viewers_millions"='11.75';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13301516_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
Question: How many U.S. viewers, in millions, watched the episode that aired on November 13, 2007?
<|assistant|>
SELECT "u_s_viewers_millions" FROM "table1_13301516_1" WHERE "original_air_date"='November 13, 2007';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13301516_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
Question: How many episodes originally aired on April 29, 2008?
<|assistant|>
SELECT COUNT("no_in_series") FROM "table1_13301516_1" WHERE "original_air_date"='April 29, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13301516_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
Question: How many millions of U.S. viewers watched episode 185?
<|assistant|>
SELECT "u_s_viewers_millions" FROM "table1_13301516_1" WHERE "no_in_series"=185;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13301516_1" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"production_code" real,
"u_s_viewers_millions" text
);
Question: Who directed the episode that originally aired on January 15, 2008?
<|assistant|>
SELECT "directed_by" FROM "table1_13301516_1" WHERE "original_air_date"='January 15, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team" (
"shirt_no" real,
"player" text,
"birth_date" text,
"weight" real,
"height" real
);
Question: How many players weight 95?
<|assistant|>
SELECT COUNT("player") FROM "team" WHERE "weight"=95;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "team" (
"shirt_no" real,
"player" text,
"birth_date" text,
"weight" real,
"height" real
);
Question: What's Enrique de la Fuente's weight?
<|assistant|>
SELECT MIN("weight") FROM "team" WHERE "player"='Enrique de la Fuente';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "passages" (
"incumbent" text,
"reason_for_vacancy" text,
"appointed_successor" text,
"date_of_appointment" text,
"elected_successor" text,
"date_of_election" text
);
Question: What was the election date for H. Brent Coles?
<|assistant|>
SELECT "date_of_election" FROM "passages" WHERE "appointed_successor"='H. Brent Coles';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "passages" (
"incumbent" text,
"reason_for_vacancy" text,
"appointed_successor" text,
"date_of_appointment" text,
"elected_successor" text,
"date_of_election" text
);
Question: What was the election date for Arthur Hodges?
<|assistant|>
SELECT "date_of_election" FROM "passages" WHERE "elected_successor"='Arthur Hodges';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season_rankings" (
"num" real,
"player" text,
"country" text,
"points" real,
"events" real,
"reset_points" real
);
Question: What is the country for # 8
<|assistant|>
SELECT "country" FROM "regular_season_rankings" WHERE "num"=8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season_rankings" (
"num" real,
"player" text,
"country" text,
"points" real,
"events" real,
"reset_points" real
);
Question: what is the country where the player is phil mickelson?
<|assistant|>
SELECT "country" FROM "regular_season_rankings" WHERE "player"='Phil Mickelson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season_rankings" (
"num" real,
"player" text,
"country" text,
"points" real,
"events" real,
"reset_points" real
);
Question: What is the highest reset points where the events is 23?
<|assistant|>
SELECT MAX("reset_points") FROM "regular_season_rankings" WHERE "events"=23;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: What round was held at Knowsley Road, resulting in a lose.
<|assistant|>
SELECT "round" FROM "fixtures_results" WHERE "venue"='Knowsley Road' AND "result"='Lose';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: What's the score of the QF round?
<|assistant|>
SELECT "score" FROM "fixtures_results" WHERE "round"='QF';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: How many rounds ended with a score of 16-52?
<|assistant|>
SELECT COUNT("round") FROM "fixtures_results" WHERE "score"='16-52';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: Who was the opponent in round 2?
<|assistant|>
SELECT "opponent" FROM "fixtures_results" WHERE "round"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: When was the game happening at Halton Stadium?
<|assistant|>
SELECT "date" FROM "fixtures_results" WHERE "venue"='Halton Stadium';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fixtures_results" (
"competition" text,
"round" text,
"opponent" text,
"result" text,
"score" text,
"home_away" text,
"venue" text,
"attendance" text,
"date" text
);
Question: What competition ended with a score of 38-14?
<|assistant|>
SELECT "competition" FROM "fixtures_results" WHERE "score"='38-14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: what's the population with country being chile
<|assistant|>
SELECT "population" FROM "ethnic_distribution_in_2005_population_e" WHERE "country"='Chile';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: what's the s mestizo with asians being 0.2% and whites being 74.8%
<|assistant|>
SELECT "s_mestizo" FROM "ethnic_distribution_in_2005_population_e" WHERE "asians"='0.2%' AND "whites"='74.8%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: what's the country with es mulatto being 3.5%
<|assistant|>
SELECT "country" FROM "ethnic_distribution_in_2005_population_e" WHERE "es_mulatto"='3.5%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: what's the s mestizo with population being 29461933
<|assistant|>
SELECT "s_mestizo" FROM "ethnic_distribution_in_2005_population_e" WHERE "population"=29461933;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: what's the native american with es mulatto being 0.7%
<|assistant|>
SELECT "native_american" FROM "ethnic_distribution_in_2005_population_e" WHERE "es_mulatto"='0.7%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ethnic_distribution_in_2005_population_e" (
"country" text,
"population" real,
"native_american" text,
"whites" text,
"s_mestizo" text,
"es_mulatto" text,
"blacks" text,
"s_zambo" text,
"asians" text
);
Question: how many native american with whites being 1.0%
<|assistant|>
SELECT COUNT("native_american") FROM "ethnic_distribution_in_2005_population_e" WHERE "whites"='1.0%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_3" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: When did the episode directed by David Duchovny originally air?
<|assistant|>
SELECT "original_air_date" FROM "table1_13336122_3" WHERE "directed_by"='David Duchovny';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_3" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: What's the title of the episode directed by David von Ancken, with a episode number bigger than 16.0?
<|assistant|>
SELECT "title" FROM "table1_13336122_3" WHERE "directed_by"='David Von Ancken' AND "no_in_series">16.0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_3" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: How many episodes have been directed by David Duchovny?
<|assistant|>
SELECT COUNT("title") FROM "table1_13336122_3" WHERE "directed_by"='David Duchovny';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_3" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text
);
Question: What's the smallest episode number of an episode whose number in the series is 22?
<|assistant|>
SELECT MIN("no_in_season") FROM "table1_13336122_3" WHERE "no_in_series"=22;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_6" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_million" text
);
Question: Name the number of shows when there was 2 million views
<|assistant|>
SELECT COUNT("u_s_viewers_million") FROM "table1_13336122_6" WHERE "no_in_season"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_6" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_million" text
);
Question: What is the episode number for "here I go again"?
<|assistant|>
SELECT MIN("no_in_series") FROM "table1_13336122_6" WHERE "title"='\"Here I Go Again\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_5" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_million" text
);
Question: what is the original air date for the episoe written by vanessa reisen?
<|assistant|>
SELECT "original_air_date" FROM "table1_13336122_5" WHERE "written_by"='Vanessa Reisen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13336122_5" (
"no_in_series" real,
"no_in_season" real,
"title" text,
"directed_by" text,
"written_by" text,
"original_air_date" text,
"u_s_viewers_million" text
);
Question: What is the u.s. viewers (million) for the title "the recused"
<|assistant|>
SELECT "u_s_viewers_million" FROM "table1_13336122_5" WHERE "title"='\"The Recused\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "buildings_completed_as_of_february_2011" (
"rank" real,
"building" text,
"address" text,
"height" text,
"storeys" real,
"completed" real
);
Question: what is the maximum completed for delta bessborough
<|assistant|>
SELECT MAX("completed") FROM "buildings_completed_as_of_february_2011" WHERE "building"='Delta Bessborough';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "buildings_completed_as_of_february_2011" (
"rank" real,
"building" text,
"address" text,
"height" text,
"storeys" real,
"completed" real
);
Question: what is the maximum completed for address on 410 22nd st e
<|assistant|>
SELECT "completed" FROM "buildings_completed_as_of_february_2011" WHERE "address"='410 22nd St E';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "buildings_completed_as_of_february_2011" (
"rank" real,
"building" text,
"address" text,
"height" text,
"storeys" real,
"completed" real
);
Question: what is the total number of building for address on 201 1st avenue south
<|assistant|>
SELECT COUNT("building") FROM "buildings_completed_as_of_february_2011" WHERE "address"='201 1st Avenue South';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "buildings_completed_as_of_february_2011" (
"rank" real,
"building" text,
"address" text,
"height" text,
"storeys" real,
"completed" real
);
Question: what are all the building with 12 storeys
<|assistant|>
SELECT "building" FROM "buildings_completed_as_of_february_2011" WHERE "storeys"=12;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "buildings_completed_as_of_february_2011" (
"rank" real,
"building" text,
"address" text,
"height" text,
"storeys" real,
"completed" real
);
Question: what is the minimum storeys on 325 5th ave n
<|assistant|>
SELECT MIN("storeys") FROM "buildings_completed_as_of_february_2011" WHERE "address"='325 5th Ave N';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1337525_1" (
"complete_series" text,
"region_1" text,
"region_2" text,
"region_4" text,
"dvd_extras_and_bonus_features" text,
"number_of_discs" real
);
Question: What is the region 2 for the complete fifth series?
<|assistant|>
SELECT "region_2" FROM "table1_1337525_1" WHERE "complete_series"='The Complete Fifth Series';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1337525_1" (
"complete_series" text,
"region_1" text,
"region_2" text,
"region_4" text,
"dvd_extras_and_bonus_features" text,
"number_of_discs" real
);
Question: What is the number of region 4 for the series of the complete seventh series?
<|assistant|>
SELECT COUNT("region_4") FROM "table1_1337525_1" WHERE "complete_series"='The Complete Seventh Series';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1337525_1" (
"complete_series" text,
"region_1" text,
"region_2" text,
"region_4" text,
"dvd_extras_and_bonus_features" text,
"number_of_discs" real
);
Question: What is the region 1 where region 4 is tba is the complete eighth series?
<|assistant|>
SELECT "region_1" FROM "table1_1337525_1" WHERE "region_4"='TBA' AND "complete_series"='The Complete Eighth Series';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1337525_1" (
"complete_series" text,
"region_1" text,
"region_2" text,
"region_4" text,
"dvd_extras_and_bonus_features" text,
"number_of_discs" real
);
Question: Name the region 4 for the complete fifth series
<|assistant|>
SELECT "region_4" FROM "table1_1337525_1" WHERE "complete_series"='The Complete Fifth Series';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many tries were against when the number won was 14?
<|assistant|>
SELECT "tries_against" FROM "2009_2010_table" WHERE "won"='14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What was the number of bonus tries when there were 522 points against?
<|assistant|>
SELECT "try_bonus" FROM "2009_2010_table" WHERE "points_against"='522';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: How many numbers were listed under losing bonus when there were 68 tries for?
<|assistant|>
SELECT COUNT("losing_bonus") FROM "2009_2010_table" WHERE "tries_for"='68';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What amount of points for were there when there was 52 points?
<|assistant|>
SELECT "points_for" FROM "2009_2010_table" WHERE "points"='52';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What was the number of points against when the amount won is 10?
<|assistant|>
SELECT "points_against" FROM "2009_2010_table" WHERE "won"='10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: What is listed under try bonus when listed under Tries for is tries for?
<|assistant|>
SELECT "try_bonus" FROM "2009_2010_table" WHERE "tries_for"='Tries for';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13403120_1" (
"num" real,
"title" text,
"director" text,
"writer_s" text,
"originalairdate" text,
"repeatairdate_s" text,
"prod_code" text
);
Question: What is the original date of the repeat air date of 26/01/1969?
<|assistant|>
SELECT "originalairdate" FROM "table1_13403120_1" WHERE "repeatairdate_s"='26/01/1969';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13403120_1" (
"num" real,
"title" text,
"director" text,
"writer_s" text,
"originalairdate" text,
"repeatairdate_s" text,
"prod_code" text
);
Question: What is the repeat date of the episode that aired 22/12/1968?
<|assistant|>
SELECT "repeatairdate_s" FROM "table1_13403120_1" WHERE "originalairdate"='22/12/1968';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13403120_1" (
"num" real,
"title" text,
"director" text,
"writer_s" text,
"originalairdate" text,
"repeatairdate_s" text,
"prod_code" text
);
Question: who is the writer of the episode with prod.code 30-17
<|assistant|>
SELECT "writer_s" FROM "table1_13403120_1" WHERE "prod_code"='30-17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_13403120_1" (
"num" real,
"title" text,
"director" text,
"writer_s" text,
"originalairdate" text,
"repeatairdate_s" text,
"prod_code" text
);
Question: what is the prod.code of the episode with original air date 01/12/1968?
<|assistant|>
SELECT COUNT("prod_code") FROM "table1_13403120_1" WHERE "originalairdate"='01/12/1968';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: In the 2008/2009 season one team had a season total points of 31, for that team how many total points were scored against them?
<|assistant|>
SELECT "points_against" FROM "2008_2009_table" WHERE "points"='31';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: In the 2008/2009 season one team had 1 losing bonus, How many points did that team score that year?
<|assistant|>
SELECT "points_for" FROM "2008_2009_table" WHERE "losing_bonus"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: In the 2008/2009 season one team had 47 tries against, how many games did they win that year?
<|assistant|>
SELECT "won" FROM "2008_2009_table" WHERE "tries_against"='47';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_2009_table" (
"club" text,
"played" text,
"won" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: In the 2008/2009 season one team had 39 tries against, how many losing bonuses did they have that year?
<|assistant|>
SELECT "losing_bonus" FROM "2008_2009_table" WHERE "tries_against"='39';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates when ed markey was the incumbent?
<|assistant|>
SELECT "candidates" FROM "massachusetts" WHERE "incumbent"='Ed Markey';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many times was the incumbent mike capuano
<|assistant|>
SELECT COUNT("result") FROM "massachusetts" WHERE "incumbent"='Mike Capuano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates when Barney Frank was the incumbent?
<|assistant|>
SELECT "candidates" FROM "massachusetts" WHERE "incumbent"='Barney Frank';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What was the earliest year someone was first elected from Massachusetts 3
<|assistant|>
SELECT MIN("first_elected") FROM "massachusetts" WHERE "district"='Massachusetts 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What party did incumbent Albert Wynn belong to?
<|assistant|>
SELECT "party" FROM "maryland" WHERE "incumbent"='Albert Wynn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What was the result of the election in the Maryland 7 district?
<|assistant|>
SELECT "results" FROM "maryland" WHERE "district"='Maryland 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How many candidates ran in the election where Wayne Gilchrest was the incumbent?
<|assistant|>
SELECT COUNT("candidates") FROM "maryland" WHERE "incumbent"='Wayne Gilchrest';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What were the results in the election where Albert Wynn was the incumbent?
<|assistant|>
SELECT "results" FROM "maryland" WHERE "incumbent"='Albert Wynn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who were the candidates in the Maryland 5 district election?
<|assistant|>
SELECT "candidates" FROM "maryland" WHERE "district"='Maryland 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341423_13" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What district is Henry Hyde in
<|assistant|>
SELECT "district" FROM "table1_1341423_13" WHERE "incumbent"='Henry Hyde';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341423_13" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What year was Luis Gutierrez election
<|assistant|>
SELECT MIN("first_elected") FROM "table1_1341423_13" WHERE "incumbent"='Luis Gutierrez';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Which district is Joe Moakley?
<|assistant|>
SELECT "district" FROM "massachusetts" WHERE "incumbent"='Joe Moakley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What is the lowest first elected?
<|assistant|>
SELECT MIN("first_elected") FROM "massachusetts";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the first election for john mchugh
<|assistant|>
SELECT COUNT("first_elected") FROM "new_york" WHERE "incumbent"='John McHugh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the results for district new york 24
<|assistant|>
SELECT "results" FROM "new_york" WHERE "district"='New York 24';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the district for carolyn mccarthy
<|assistant|>
SELECT "district" FROM "new_york" WHERE "incumbent"='Carolyn McCarthy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the number of party for new york 29
<|assistant|>
SELECT COUNT("party") FROM "new_york" WHERE "district"='New York 29';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "michigan" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Which party does the incumbent first elected in 1994 belong to?
<|assistant|>
SELECT "party" FROM "michigan" WHERE "first_elected"=1994;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "michigan" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How many districts have Bart Stupak as the incumbent?
<|assistant|>
SELECT COUNT("district") FROM "michigan" WHERE "incumbent"='Bart Stupak';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ohio" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who was elected in 1972
<|assistant|>
SELECT "incumbent" FROM "ohio" WHERE "first_elected"=1972;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: what is the earliest first elected with the results re-elected in the district south carolina 3?
<|assistant|>
SELECT MAX("first_elected") FROM "south_carolina" WHERE "results"='Re-elected' AND "district"='South Carolina 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: what is the party with the incumbent jim demint?
<|assistant|>
SELECT "party" FROM "south_carolina" WHERE "incumbent"='Jim DeMint';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: what is the party for the district south carolina 4?
<|assistant|>
SELECT "party" FROM "south_carolina" WHERE "district"='South Carolina 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: what is the party when candidates is jim demint (r) 80%?
<|assistant|>
SELECT "party" FROM "south_carolina" WHERE "candidates"='Jim DeMint (R) 80%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: what is the party when candidates is jim demint (r) 80%?
<|assistant|>
SELECT "party" FROM "south_carolina" WHERE "candidates"='Jim DeMint (R) 80%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "south_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: who are the candidates when the incumbent is lindsey graham?
<|assistant|>
SELECT "candidates" FROM "south_carolina" WHERE "incumbent"='Lindsey Graham';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What was the results when the incumbent was ernest istook?
<|assistant|>
SELECT "results" FROM "oklahoma" WHERE "incumbent"='Ernest Istook';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What was the results for the district oklahoma 3?
<|assistant|>
SELECT "results" FROM "oklahoma" WHERE "district"='Oklahoma 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: How many party were listed for district oklahoma 5?
<|assistant|>
SELECT COUNT("party") FROM "oklahoma" WHERE "district"='Oklahoma 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What is the party when the candidates were ernest istook (r) 69% garland mcwatters (d) 28%?
<|assistant|>
SELECT "party" FROM "oklahoma" WHERE "candidates"='Ernest Istook (R) 69% Garland McWatters (D) 28%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: when was the first elected for districk oklahoma 1?
<|assistant|>
SELECT "first_elected" FROM "oklahoma" WHERE "district"='Oklahoma 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "oklahoma" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What were the results for the district oklahoma 5?
<|assistant|>
SELECT "results" FROM "oklahoma" WHERE "district"='Oklahoma 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How many parties is the incumbent Bob Brady a member of?
<|assistant|>
SELECT COUNT("party") FROM "pennsylvania" WHERE "incumbent"='Bob Brady';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How many candidates were there in the district won by Joe Hoeffel?
<|assistant|>
SELECT COUNT("candidates") FROM "pennsylvania" WHERE "incumbent"='Joe Hoeffel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who were the candidates in district Pennsylvania 3?
<|assistant|>
SELECT "candidates" FROM "pennsylvania" WHERE "district"='Pennsylvania 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What's the first elected year of the district whose incumbent is Jim Greenwood?
<|assistant|>
SELECT MAX("first_elected") FROM "pennsylvania" WHERE "incumbent"='Jim Greenwood';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341423_46" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What was the result of the election featuring incumbent norman sisisky?
<|assistant|>
SELECT "results" FROM "table1_1341423_46" WHERE "incumbent"='Norman Sisisky';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who were the candidates in the district first elected in 1998 whose incumbent ended up being Paul Ryan?
<|assistant|>
SELECT "candidates" FROM "wisconsin" WHERE "first_elected"=1998 AND "incumbent"='Paul Ryan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who ran in the district elections won by Tom Petri?
<|assistant|>
SELECT "candidates" FROM "wisconsin" WHERE "incumbent"='Tom Petri';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: When was the first election in the district whose incumbent is Ron Kind?
<|assistant|>
SELECT MIN("first_elected") FROM "wisconsin" WHERE "incumbent"='Ron Kind';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What year was the first election in the district whose election now was won by Ron Kind?
<|assistant|>
SELECT MIN("first_elected") FROM "wisconsin" WHERE "incumbent"='Ron Kind';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.