output
stringlengths 27
479
| instruction
stringlengths 407
1.39k
|
|---|---|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1974;
|
## Task
Generate a SQL query to answer the following question:
`What is the incumbent for 1974?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the incumbent for 1974?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Cardiss Collins';
|
## Task
Generate a SQL query to answer the following question:
`To what party does Cardiss Collins belong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `To what party does Cardiss Collins belong?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 3';
|
## Task
Generate a SQL query to answer the following question:
`Who was the candidate in the Virginia 3 district election? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 was the candidate in the Virginia 3 district election? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 3';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in the Virginia 3 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 result of the election in the Virginia 3 district?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lamar S. Smith';
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates when Lamar S. Smith was incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 Lamar S. Smith was incumbent?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Beau Boulter';
|
## Task
Generate a SQL query to answer the following question:
`What party did Beau Boulter represent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 party did Beau Boulter represent?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jack Fields';
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates when Jack Fields was the incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 Jack Fields was the incumbent?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Les Aspin';
|
## Task
Generate a SQL query to answer the following question:
`What was the final result for Les Aspin?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 final result for Les Aspin?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1982;
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates that ran when Jim Moody was up for reelection after 1982?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 that ran when Jim Moody was up for reelection after 1982?`:
```sql
|
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 6';
|
## Task
Generate a SQL query to answer the following question:
`In the district called Tennessee 6, how many in total of first elected are there?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In the district called Tennessee 6, how many in total of first elected are there?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1982;
|
## Task
Generate a SQL query to answer the following question:
`Which party is associated with the person who was first elected in 1982?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Which party is associated with the person who was first elected in 1982?`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Bob Clement';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates are listed all together for the incumbent named bob clement?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 candidates are listed all together for the incumbent named bob clement?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Bart Gordon (D) 76.5% Wallace Embry (R) 23.5%';
|
## Task
Generate a SQL query to answer the following question:
`What was the results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Marilyn Lloyd (D) 57.4% Harold W. Coker (R) 42.6%';
|
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent that is listed with the candidates listed as marilyn lloyd (d) 57.4% harold w. coker (r) 42.6%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the incumbent that is listed with the candidates listed as marilyn lloyd (d) 57.4% harold w. coker (r) 42.6%?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Jim Cooper (D) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`In what district would you find the candidates listed as jim cooper (d) unopposed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In what district would you find the candidates listed as jim cooper (d) unopposed?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Bud Shuster (R) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`who is the incumbent with candidates being bud shuster (r) unopposed`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the incumbent with candidates being bud shuster (r) unopposed`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Tom Ridge (R) 80.9% Joylyn Blackwell (D) 19.1%';
|
## Task
Generate a SQL query to answer the following question:
`who is the incumbent with candidates being tom ridge (r) 80.9% joylyn blackwell (d) 19.1%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the incumbent with candidates being tom ridge (r) 80.9% joylyn blackwell (d) 19.1%`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Curt Weldon (R) 61.3% Bill Spingler (D) 38.7%';
|
## Task
Generate a SQL query to answer the following question:
`what's district with candidates being curt weldon (r) 61.3% bill spingler (d) 38.7%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's district with candidates being curt weldon (r) 61.3% bill spingler (d) 38.7%`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 21';
|
## Task
Generate a SQL query to answer the following question:
`what's party with district being pennsylvania 21`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's party with district being pennsylvania 21`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Gus Yatron';
|
## Task
Generate a SQL query to answer the following question:
`what is the maximum first elected with incumbent being gus yatron`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the maximum first elected with incumbent being gus yatron`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1972;
|
## Task
Generate a SQL query to answer the following question:
`what's the district with first elected being 1972`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's the district with first elected being 1972`:
```sql
|
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lindy Boggs';
|
## Task
Generate a SQL query to answer the following question:
` how many district with incumbent being lindy boggs`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 district with incumbent being lindy boggs`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Billy Tauzin (D) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`what's the result with candidates being billy tauzin (d) unopposed`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's the result with candidates being billy tauzin (d) unopposed`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "result"='Retired to run for U. S. Senate Republican hold';
|
## Task
Generate a SQL query to answer the following question:
` how many candidates with result being retired to run for u. s. senate republican hold`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 candidates with result being retired to run for u. s. senate republican hold`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 2';
|
## Task
Generate a SQL query to answer the following question:
`what's the result with district being louisiana 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's the result with district being louisiana 2`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1977;
|
## Task
Generate a SQL query to answer the following question:
`who is the the candidates with first elected being 1977`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the the candidates with first elected being 1977`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1980;
|
## Task
Generate a SQL query to answer the following question:
`What happened to the incombent who was elected in 1980?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 happened to the incombent who was elected in 1980?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Terry L. Bruce';
|
## Task
Generate a SQL query to answer the following question:
`How did the election end for Terry L. Bruce?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 did the election end for Terry L. Bruce?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tony P. Hall';
|
## Task
Generate a SQL query to answer the following question:
`What party was Tony P. Hall affiliated with?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 party was Tony P. Hall affiliated with?`:
```sql
|
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 2';
|
## Task
Generate a SQL query to answer the following question:
`Name number first elected for tennessee 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Name number first elected for tennessee 2?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1964;
|
## Task
Generate a SQL query to answer the following question:
`Name the candidates in 1964`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Name the candidates in 1964`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Mac Sweeney';
|
## Task
Generate a SQL query to answer the following question:
`How many districts have Mac Sweeney as incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 districts have Mac Sweeney as incumbent?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Henry B. Gonzalez';
|
## Task
Generate a SQL query to answer the following question:
`Who are all the candidates vying for Henry B. Gonzalez' seat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 are all the candidates vying for Henry B. Gonzalez' seat?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Albert Bustamante';
|
## Task
Generate a SQL query to answer the following question:
`Name all the candidates vying for Albert Bustamante's seat.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Name all the candidates vying for Albert Bustamante's seat.`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Michael Bilirakis';
|
## Task
Generate a SQL query to answer the following question:
`In what district was the incumbent Michael Bilirakis? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In what district was the incumbent Michael Bilirakis? `:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1980;
|
## Task
Generate a SQL query to answer the following question:
`Who is the candidate in election where the incumbent was first elected in 1980? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the candidate in election where the incumbent was first elected in 1980? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles Edward Bennett';
|
## Task
Generate a SQL query to answer the following question:
`What party does incumbent Charles Edward Bennett belong to? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 party does incumbent Charles Edward Bennett belong to? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Florida 18';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in the Florida 18 district? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 result of the election in the Florida 18 district? `:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lawrence J. Smith';
|
## Task
Generate a SQL query to answer the following question:
`In what district is the incumbent Lawrence J. Smith? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In what district is the incumbent Lawrence J. Smith? `:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Del Latta';
|
## Task
Generate a SQL query to answer the following question:
`where is the district where the incumbent is del latta?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `where is the district where the incumbent is del latta?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Ohio 11';
|
## Task
Generate a SQL query to answer the following question:
`what is the party for district ohio 11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the party for district ohio 11?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Ohio 6';
|
## Task
Generate a SQL query to answer the following question:
`who were the candidates for district ohio 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 for district ohio 6?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 9';
|
## Task
Generate a SQL query to answer the following question:
`What is the party for District Georgia 9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the party for District Georgia 9?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1980;
|
## Task
Generate a SQL query to answer the following question:
`Which district shows a first elected of 1980?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Which district shows a first elected of 1980?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Wyche Fowler';
|
## Task
Generate a SQL query to answer the following question:
`What is the party for the incumbent Wyche Fowler?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the party for the incumbent Wyche Fowler?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='George Darden';
|
## Task
Generate a SQL query to answer the following question:
`Who are shown as candidates when George Darden is the incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 are shown as candidates when George Darden is the incumbent?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Dan Crane';
|
## Task
Generate a SQL query to answer the following question:
`What district has Dan Crane as incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 district has Dan Crane as incumbent?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert W. Edgar';
|
## Task
Generate a SQL query to answer the following question:
`In which district is Robert W. Edgar the incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In which district is Robert W. Edgar the incumbent?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert W. Edgar';
|
## Task
Generate a SQL query to answer the following question:
`To which party does Robert W. Edgar belong?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `To which party does Robert W. Edgar belong?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jack Hightower';
|
## Task
Generate a SQL query to answer the following question:
`What district is incumbent jack hightower from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 district is incumbent jack hightower from?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Tom Loeffler (R) 80.6% Joe Sullivan (D) 19.4%';
|
## Task
Generate a SQL query to answer the following question:
`What year were the election results tom loeffler (r) 80.6% joe sullivan (d) 19.4%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 year were the election results tom loeffler (r) 80.6% joe sullivan (d) 19.4%?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 22';
|
## Task
Generate a SQL query to answer the following question:
`What incumbent won the district of texas 22?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 incumbent won the district of texas 22?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 1';
|
## Task
Generate a SQL query to answer the following question:
`Who's the incumbent of the Louisiana 1 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's the incumbent of the Louisiana 1 district?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 4';
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates in the Louisiana 4 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 in the Louisiana 4 district?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1976;
|
## Task
Generate a SQL query to answer the following question:
`Who's the incumbent in the district first elected in 1976?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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's the incumbent in the district first elected in 1976?`:
```sql
|
SELECT "incumbent" FROM "table1_1341604_22" WHERE "district"='Massachusetts 2';
|
## Task
Generate a SQL query to answer the following question:
`what's the incumbent with district being massachusetts 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_22" (
"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's the incumbent with district being massachusetts 2`:
```sql
|
SELECT "party" FROM "table1_1341604_22" WHERE "candidates"='Silvio Conte (R) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`what's the party with candidates being silvio conte (r) unopposed`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_22" (
"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's the party with candidates being silvio conte (r) unopposed`:
```sql
|
SELECT "first_elected" FROM "table1_1341604_22" WHERE "incumbent"='Joseph D. Early';
|
## Task
Generate a SQL query to answer the following question:
`what's the first elected with incumbent being joseph d. early`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_22" (
"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's the first elected with incumbent being joseph d. early`:
```sql
|
SELECT "incumbent" FROM "table1_1341604_22" WHERE "district"='Massachusetts 2';
|
## Task
Generate a SQL query to answer the following question:
`who is the the incumbent with dbeingtrict being massachusetts 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_22" (
"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 is the the incumbent with dbeingtrict being massachusetts 2`:
```sql
|
SELECT "party" FROM "table1_1341604_22" WHERE "district"='Massachusetts 3';
|
## Task
Generate a SQL query to answer the following question:
`what's the party with dbeingtrict being massachusetts 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_22" (
"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's the party with dbeingtrict being massachusetts 3`:
```sql
|
SELECT COUNT("candidates") FROM "table1_1341604_39" WHERE "incumbent"='Bud Shuster';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates won the election in the district whose incumbent is Bud Shuster?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_39" (
"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 candidates won the election in the district whose incumbent is Bud Shuster?`:
```sql
|
SELECT "candidates" FROM "table1_1341604_39" WHERE "incumbent"='Gus Yatron';
|
## Task
Generate a SQL query to answer the following question:
`What are the candidates in the district whose incumbent is Gus Yatron?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_39" (
"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 are the candidates in the district whose incumbent is Gus Yatron?`:
```sql
|
SELECT "party" FROM "table1_1341604_39" WHERE "district"='Pennsylvania 6';
|
## Task
Generate a SQL query to answer the following question:
`What's the winning party in the Pennsylvania 6 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341604_39" (
"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's the winning party in the Pennsylvania 6 district?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "party"='Republican';
|
## Task
Generate a SQL query to answer the following question:
`What candidate is a member of the Republican party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 candidate is a member of the Republican party?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ray Musto';
|
## Task
Generate a SQL query to answer the following question:
`What district is Ray Musto the incumbent of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 district is Ray Musto the incumbent of?`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Donald A. Bailey';
|
## Task
Generate a SQL query to answer the following question:
`How many parties does the incumbent Donald A. Bailey a member of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 parties does the incumbent Donald A. Bailey a member of?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 6';
|
## Task
Generate a SQL query to answer the following question:
`What was the outcome of the election in Pennsylvania 6 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 outcome of the election in Pennsylvania 6 district?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Al Gore';
|
## Task
Generate a SQL query to answer the following question:
`Where was Al Gore elected`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Where was Al Gore elected`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1976;
|
## Task
Generate a SQL query to answer the following question:
`Election results of 1976`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Election results of 1976`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Missouri 1';
|
## Task
Generate a SQL query to answer the following question:
`What was the incumbent for missouri 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 incumbent for missouri 1?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1960;
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election when someone was first elected in 1960?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 result of the election when someone was first elected in 1960?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Phil Crane';
|
## Task
Generate a SQL query to answer the following question:
`What year was incumbent phil crane first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 year was incumbent phil crane first elected?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1974;
|
## Task
Generate a SQL query to answer the following question:
`What candidates were featured in the 1974 election?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 candidates were featured in the 1974 election?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jerry Huckaby';
|
## Task
Generate a SQL query to answer the following question:
`What year was Jerry Huckaby first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 year was Jerry Huckaby first elected?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Dave Treen';
|
## Task
Generate a SQL query to answer the following question:
`What other cadidate ran against Dave Treen?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 other cadidate ran against Dave Treen?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e";
|
## Task
Generate a SQL query to answer the following question:
`What year was the earliest first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 year was the earliest first elected?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Dave Treen';
|
## Task
Generate a SQL query to answer the following question:
`What district did Dave Treen serve?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 district did Dave Treen serve?`:
```sql
|
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1972;
|
## Task
Generate a SQL query to answer the following question:
`How many sitting politicians were originally elected in 1972?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 sitting politicians were originally elected in 1972?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 6';
|
## Task
Generate a SQL query to answer the following question:
`In the Georgia 6 district, what is the elected party?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In the Georgia 6 district, what is the elected party?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Billy Lee Evans';
|
## Task
Generate a SQL query to answer the following question:
`In the race involving Billy Lee Evans as the seated Representative, was he elected again?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `In the race involving Billy Lee Evans as the seated Representative, was he elected again?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ronald \"Bo\" Ginn';
|
## Task
Generate a SQL query to answer the following question:
`Which district has Ronald "bo" Ginn as the seated Representative?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Which district has Ronald "bo" Ginn as the seated Representative?`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Dawson Mathis';
|
## Task
Generate a SQL query to answer the following question:
`How many parties are there in races involving Dawson Mathis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 parties are there in races involving Dawson Mathis?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "party"='Republican';
|
## Task
Generate a SQL query to answer the following question:
`Which district is republican?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Which district is republican?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='George H. Mahon';
|
## Task
Generate a SQL query to answer the following question:
`Name the result when the incumbent was george h. mahon`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Name the result when the incumbent was george h. mahon`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 3';
|
## Task
Generate a SQL query to answer the following question:
`What was the incumbent of texas 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 incumbent of texas 3?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 19';
|
## Task
Generate a SQL query to answer the following question:
`What was the incumbent for texas 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 incumbent for texas 19?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%';
|
## Task
Generate a SQL query to answer the following question:
`Which district has candidates is dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `Which district has candidates is dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Missouri 2';
|
## Task
Generate a SQL query to answer the following question:
`What is the result for the district missouri 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 is the result for the district missouri 2?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Missouri 7';
|
## Task
Generate a SQL query to answer the following question:
`When was the first elected for district missouri 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `When was the first elected for district missouri 7?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e";
|
## Task
Generate a SQL query to answer the following question:
`When was the earliest first election?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 `When was the earliest first election?`:
```sql
|
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%';
|
## Task
Generate a SQL query to answer the following question:
`How many times was the candidates dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 candidates dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?`:
```sql
|
SELECT "district" FROM "table1_1341663_33" WHERE "incumbent"='S. William Green';
|
## Task
Generate a SQL query to answer the following question:
`What district did S. William Green belong to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_33" (
"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 district did S. William Green belong to?`:
```sql
|
SELECT "district" FROM "table1_1341663_33" WHERE "party"='Democratic' AND "first_elected"=1974 AND "incumbent"='Stephen J. Solarz';
|
## Task
Generate a SQL query to answer the following question:
`What district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_33" (
"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 district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974?`:
```sql
|
SELECT MIN("first_elected") FROM "table1_1341663_33" WHERE "incumbent"='Stephen J. Solarz';
|
## Task
Generate a SQL query to answer the following question:
`When was Stephen J. Solarz first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_33" (
"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 `When was Stephen J. Solarz first elected?`:
```sql
|
SELECT "candidates" FROM "table1_1341663_33" WHERE "incumbent"='Shirley Chisholm';
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates when Shirley Chisholm was the incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_33" (
"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 Shirley Chisholm was the incumbent?`:
```sql
|
SELECT "district" FROM "table1_1341663_6" WHERE "incumbent"='Bob Wilson';
|
## Task
Generate a SQL query to answer the following question:
`What is the district that has Bob Wilson as an incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_6" (
"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 is the district that has Bob Wilson as an incumbent?`:
```sql
|
SELECT COUNT("result") FROM "table1_1341663_6" WHERE "district"='California 38';
|
## Task
Generate a SQL query to answer the following question:
`How many outcomes were there in the elections in California 38?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_6" (
"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 outcomes were there in the elections in California 38?`:
```sql
|
SELECT "district" FROM "table1_1341663_6" WHERE "incumbent"='Charles H. Wilson';
|
## Task
Generate a SQL query to answer the following question:
`What district is Charles H. Wilson the incumbent of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_6" (
"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 district is Charles H. Wilson the incumbent of?`:
```sql
|
SELECT "party" FROM "table1_1341663_6" WHERE "district"='California 30';
|
## Task
Generate a SQL query to answer the following question:
`What party was the winning one in the elections in the California 30 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1341663_6" (
"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 party was the winning one in the elections in the California 30 district?`:
```sql
|
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Robert L. Leggett (D) 50.2% Albert Dehr (R) 49.8%';
|
## Task
Generate a SQL query to answer the following question:
`How many times did an election feature the result robert l. leggett (d) 50.2% albert dehr (r) 49.8%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"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 did an election feature the result robert l. leggett (d) 50.2% albert dehr (r) 49.8%?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.