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