cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`How many districts was Robert Livingston incumbent in?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "louisiana" (
  "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 was Robert Livingston incumbent in?`:
```sql
                SELECT COUNT("district") FROM "louisiana" WHERE "incumbent"='Robert Livingston';
```
## Task
Generate a SQL query to answer the following question:
`What is the first election year listed?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "louisiana" (
  "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 first election year listed?`:
```sql
                SELECT MIN("first_elected") FROM "louisiana";
```
## Task
Generate a SQL query to answer the following question:
`List all results in elections with Richard Baker as the incumbent.`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "louisiana" (
  "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 `List all results in elections with Richard Baker as the incumbent.`:
```sql
                SELECT "result" FROM "louisiana" WHERE "incumbent"='Richard Baker';
```
## Task
Generate a SQL query to answer the following question:
` how many party with district being washington 7`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "washington" (
  "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 party with district being washington 7`:
```sql
                SELECT COUNT("party") FROM "washington" WHERE "district"='Washington 7';
```
## Task
Generate a SQL query to answer the following question:
`what's the latest first elected year`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "washington" (
  "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 latest first elected year`:
```sql
                SELECT MAX("first_elected") FROM "washington";
```
## Task
Generate a SQL query to answer the following question:
`what's the result with district being washington 7`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "washington" (
  "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 washington 7`:
```sql
                SELECT "result" FROM "washington" WHERE "district"='Washington 7';
```
## Task
Generate a SQL query to answer the following question:
`what being the minimum first elected with district being washington 7`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "washington" (
  "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 being the minimum first elected with district being washington 7`:
```sql
                SELECT MIN("first_elected") FROM "washington" WHERE "district"='Washington 7';
```
## Task
Generate a SQL query to answer the following question:
`what's the result for first elected in 1948 , 1964`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the result for first elected in 1948 , 1964`:
```sql
                SELECT "result" FROM "illinois" WHERE "first_elected"='1948 , 1964';
```
## Task
Generate a SQL query to answer the following question:
`what's the first elected with district illinois 18`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the first elected with district illinois 18`:
```sql
                SELECT "first_elected" FROM "illinois" WHERE "district"='Illinois 18';
```
## Task
Generate a SQL query to answer the following question:
`what's the party with candidates  jerry weller (r) 51.77% clem balanoff (d) 48.23%`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the party with candidates  jerry weller (r) 51.77% clem balanoff (d) 48.23%`:
```sql
                SELECT "party" FROM "illinois" WHERE "candidates"='Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%';
```
## Task
Generate a SQL query to answer the following question:
`what's the party for the first elected in 1980`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the party for the first elected in 1980`:
```sql
                SELECT "party" FROM "illinois" WHERE "first_elected"='1980';
```
## Task
Generate a SQL query to answer the following question:
`what's the result with district illinois 15`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the result with district illinois 15`:
```sql
                SELECT "result" FROM "illinois" WHERE "district"='Illinois 15';
```
## Task
Generate a SQL query to answer the following question:
`what's the total number of candidates for first elected in 1948 , 1964`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "illinois" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the total number of candidates for first elected in 1948 , 1964`:
```sql
                SELECT COUNT("candidates") FROM "illinois" WHERE "first_elected"='1948 , 1964';
```
## Task
Generate a SQL query to answer the following question:
`Name thedistrict for 1994`

### 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,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name thedistrict for 1994`:
```sql
                SELECT "district" FROM "new_york" WHERE "first_elected"=1994;
```
## Task
Generate a SQL query to answer the following question:
`Name the result for New York 11`

### 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,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for New York 11`:
```sql
                SELECT "result" FROM "new_york" WHERE "district"='New York 11';
```
## Task
Generate a SQL query to answer the following question:
`Name the number of first elected for new york 11`

### 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,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the number of first elected for new york 11`:
```sql
                SELECT COUNT("first_elected") FROM "new_york" WHERE "district"='New York 11';
```
## Task
Generate a SQL query to answer the following question:
`Name the first elected for new york 1`

### 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,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the first elected for new york 1`:
```sql
                SELECT COUNT("first_elected") FROM "new_york" WHERE "district"='New York 1';
```
## Task
Generate a SQL query to answer the following question:
`What year was Larry combest elected`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "texas" (
  "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 Larry combest elected`:
```sql
                SELECT "first_elected" FROM "texas" WHERE "incumbent"='Larry Combest';
```
## Task
Generate a SQL query to answer the following question:
`To what district does Bill Hefner belong?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `To what district does Bill Hefner belong?`:
```sql
                SELECT "district" FROM "north_carolina" WHERE "incumbent"='Bill Hefner';
```
## Task
Generate a SQL query to answer the following question:
`Who ran unsuccessfully against Bill Hefner?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who ran unsuccessfully against Bill Hefner?`:
```sql
                SELECT "opponent" FROM "north_carolina" WHERE "incumbent"='Bill Hefner';
```
## Task
Generate a SQL query to answer the following question:
`How many districts are respresented by Alex McMillan?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many districts are respresented by Alex McMillan?`:
```sql
                SELECT COUNT("status") FROM "north_carolina" WHERE "incumbent"='Alex McMillan';
```
## Task
Generate a SQL query to answer the following question:
`What party is Sanford Bishop a member of?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "georgia" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party is Sanford Bishop a member of?`:
```sql
                SELECT "party" FROM "georgia" WHERE "incumbent"='Sanford Bishop';
```
## Task
Generate a SQL query to answer the following question:
`What party won in the district Georgia7?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "georgia" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party won in the district Georgia7?`:
```sql
                SELECT "party" FROM "georgia" WHERE "district"='Georgia7';
```
## Task
Generate a SQL query to answer the following question:
`What's Georgia5's first elected year?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "georgia" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's Georgia5's first elected year?`:
```sql
                SELECT MAX("first_elected") FROM "georgia" WHERE "district"='Georgia5';
```
## Task
Generate a SQL query to answer the following question:
`Who opposed Marty Meehan in each election?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who opposed Marty Meehan in each election?`:
```sql
                SELECT "opponent" FROM "massachusetts" WHERE "incumbent"='Marty Meehan';
```
## Task
Generate a SQL query to answer the following question:
`Who are the opponents in Massachusetts5 district?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the opponents in Massachusetts5 district?`:
```sql
                SELECT "opponent" FROM "massachusetts" WHERE "district"='Massachusetts5';
```
## Task
Generate a SQL query to answer the following question:
`What parties are represented in Massachusetts4 district?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What parties are represented in Massachusetts4 district?`:
```sql
                SELECT "party" FROM "massachusetts" WHERE "district"='Massachusetts4';
```
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent in district Massachusetts7?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the incumbent in district Massachusetts7?`:
```sql
                SELECT "incumbent" FROM "massachusetts" WHERE "district"='Massachusetts7';
```
## Task
Generate a SQL query to answer the following question:
` how many first elected with district being new york2`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_1341549_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 ` how many first elected with district being new york2`:
```sql
                SELECT COUNT("first_elected") FROM "table1_1341549_33" WHERE "district"='New York2';
```
## Task
Generate a SQL query to answer the following question:
` how many district with candidates being eliot l. engel (d) 85.2% martin richman (r) 14.8%`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_1341549_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 ` how many district with candidates being eliot l. engel (d) 85.2% martin richman (r) 14.8%`:
```sql
                SELECT COUNT("district") FROM "table1_1341549_33" WHERE "candidates"='Eliot L. Engel (D) 85.2% Martin Richman (R) 14.8%';
```
## Task
Generate a SQL query to answer the following question:
` how many candidates with party being democratic and dbeingtrict being new york5`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_1341549_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 ` how many candidates with party being democratic and dbeingtrict being new york5`:
```sql
                SELECT COUNT("candidates") FROM "table1_1341549_33" WHERE "party"='Democratic' AND "district"='New York5';
```
## Task
Generate a SQL query to answer the following question:
` how many first elected with result being re-elected and incumbent being gary ackerman redistricted from the 7th district`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "table1_1341549_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 ` how many first elected with result being re-elected and incumbent being gary ackerman redistricted from the 7th district`:
```sql
                SELECT COUNT("first_elected") FROM "table1_1341549_33" WHERE "result"='Re-elected' AND "incumbent"='Gary Ackerman Redistricted from the 7th district';
```
## Task
Generate a SQL query to answer the following question:
`What party does ron klink represent?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party does ron klink represent?`:
```sql
                SELECT "party" FROM "pennsylvania" WHERE "incumbent"='Ron Klink';
```
## Task
Generate a SQL query to answer the following question:
`Who was in the election that was for incumbent bud shuster's seat?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was in the election that was for incumbent bud shuster's seat?`:
```sql
                SELECT "opponent" FROM "pennsylvania" WHERE "incumbent"='Bud Shuster';
```
## Task
Generate a SQL query to answer the following question:
`What district had someone first elected in 1982?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What district had someone first elected in 1982?`:
```sql
                SELECT "district" FROM "pennsylvania" WHERE "first_elected"=1982;
```
## Task
Generate a SQL query to answer the following question:
`How many republican incumbents first elected in 1974?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many republican incumbents first elected in 1974?`:
```sql
                SELECT COUNT("incumbent") FROM "pennsylvania" WHERE "party"='Republican' AND "first_elected"=1974;
```
## Task
Generate a SQL query to answer the following question:
`What was the result of the election where william f. goodling was the incumbent?`

### 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,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the election where william f. goodling was the incumbent?`:
```sql
                SELECT "status" FROM "pennsylvania" WHERE "incumbent"='William F. Goodling';
```
## Task
Generate a SQL query to answer the following question:
`What party did incumbent Howard Coble belong to?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did incumbent Howard Coble belong to?`:
```sql
                SELECT "party" FROM "north_carolina" WHERE "incumbent"='Howard Coble';
```
## Task
Generate a SQL query to answer the following question:
`What party did incumbent Stephen L. Neal belong to? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did incumbent Stephen L. Neal belong to? `:
```sql
                SELECT "party" FROM "north_carolina" WHERE "incumbent"='Stephen L. Neal';
```
## Task
Generate a SQL query to answer the following question:
`In how many districts was the democratic incumbent elected in 1974? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `In how many districts was the democratic incumbent elected in 1974? `:
```sql
                SELECT COUNT("district") FROM "north_carolina" WHERE "party"='Democratic' AND "elected"=1974;
```
## Task
Generate a SQL query to answer the following question:
`What year was incumbent Martin Lancaster elected? `

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "north_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was incumbent Martin Lancaster elected? `:
```sql
                SELECT MIN("elected") FROM "north_carolina" WHERE "incumbent"='Martin Lancaster';
```
## Task
Generate a SQL query to answer the following question:
`What are the locations where the year of election is 1980?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "minnesota" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What are the locations where the year of election is 1980?`:
```sql
                SELECT "district" FROM "minnesota" WHERE "elected"=1980;
```
## Task
Generate a SQL query to answer the following question:
`What location is Vin Weber from?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "minnesota" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What location is Vin Weber from?`:
```sql
                SELECT "district" FROM "minnesota" WHERE "incumbent"='Vin Weber';
```
## Task
Generate a SQL query to answer the following question:
`What is Larry Combest's district?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "texas" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Larry Combest's district?`:
```sql
                SELECT "district" FROM "texas" WHERE "incumbent"='Larry Combest';
```
## Task
Generate a SQL query to answer the following question:
`What is the status of incumbent Charles Stenholm?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "texas" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the status of incumbent Charles Stenholm?`:
```sql
                SELECT "status" FROM "texas" WHERE "incumbent"='Charles Stenholm';
```
## Task
Generate a SQL query to answer the following question:
`How many incumbents represent district California 34?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "california" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" text,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many incumbents represent district California 34?`:
```sql
                SELECT COUNT("incumbent") FROM "california" WHERE "district"='California 34';
```
## Task
Generate a SQL query to answer the following question:
`What is the elected status of the Democratic party in 1989?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "california" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" text,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the elected status of the Democratic party in 1989?`:
```sql
                SELECT "status" FROM "california" WHERE "party"='Democratic' AND "elected"='1989';
```
## Task
Generate a SQL query to answer the following question:
`Who are the opponents in district California 9?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "california" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" text,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the opponents in district California 9?`:
```sql
                SELECT "opponent" FROM "california" WHERE "district"='California 9';
```
## Task
Generate a SQL query to answer the following question:
`Who are the incumbents elected in 1974?`

### Database Schema
This query will run on a database whose schema is represented in this string:

CREATE TABLE "california" (
  "district" text,
  "incumbent" text,
  "party" text,
  "elected" text,
  "status" text,
  "opponent" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the incumbents elected in 1974?`:
```sql
                SELECT "incumbent" FROM "california" WHERE "elected"='1974';
```
## Task
Generate a SQL query to answer the following question:
`Which incumbent was first elected in 1958?`

### 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 incumbent was first elected in 1958?`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1958;
```
## Task
Generate a SQL query to answer the following question:
`Who are all the candidates who ran in the district where Ralph Regula 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 all the candidates who ran in the district where Ralph Regula is the incumbent?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ralph Regula';
```
## Task
Generate a SQL query to answer the following question:
`Which party does Del Latta 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 `Which party does Del Latta belong to?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Del Latta';
```
## Task
Generate a SQL query to answer the following question:
`Which party does Tom Luken 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 `Which party does Tom Luken belong to?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tom Luken';
```
## Task
Generate a SQL query to answer the following question:
`Who were all the candidates when incumbent was Tim Valentine?`

### 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 all the candidates when incumbent was Tim Valentine?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tim Valentine';
```
## Task
Generate a SQL query to answer the following question:
`Name the incumbent for first elected 1958`

### 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 incumbent for first elected 1958`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1958;
```
## Task
Generate a SQL query to answer the following question:
`What is the district for 1952?`

### 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 district for 1952?`:
```sql
                SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1952;
```
## 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 "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1974;
```
## 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 "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Cardiss Collins';
```
## 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 "candidates" 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 "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 3';
```
## 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 "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lamar S. Smith';
```
## 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 "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Beau Boulter';
```
## 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 "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jack Fields';
```
## 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 "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Les Aspin';
```
## 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 "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1982;
```
## 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 COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 6';
```
## 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 "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1982;
```
## 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 COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Bob Clement';
```
## 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 "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:
`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 "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:
`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 "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Jim Cooper (D) 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"='Bud Shuster (R) Unopposed';
```
## 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 "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:
`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 "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 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 "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 21';
```
## 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 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'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 "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1972;
```
## 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 COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lindy Boggs';
```