cfahlgren1/wiki_sql_pg_converted huggingface dataset:
## Task
Generate a SQL query to answer the following question:
`What is the species when jewel is coal?`

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

CREATE TABLE "jewelpets" (
  "name" text,
  "jewel" text,
  "species" text,
  "gender" text,
  "jewel_power" text,
  "attribute" text,
  "birthday" text,
  "media_debut" text,
  "voice_actor" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the species when jewel is coal?`:
```sql
                SELECT "species" FROM "jewelpets" WHERE "jewel"='Coal';
```
## Task
Generate a SQL query to answer the following question:
`Who was the lights 2 race two winning team when the lites 1 race one winning team was #13 Inspire Motorsports?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the lights 2 race two winning team when the lites 1 race one winning team was #13 Inspire Motorsports?`:
```sql
                SELECT "lites_2_race_two_winning_team" FROM "table1_26638600_3" WHERE "lites_1_race_one_winning_team"='#13 Inspire Motorsports';
```
## Task
Generate a SQL query to answer the following question:
`How many different circuits had Gary Gibson has the Lites 1 race two winning team?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many different circuits had Gary Gibson has the Lites 1 race two winning team?`:
```sql
                SELECT COUNT("lites_2_race_one_winning_team") FROM "table1_26638600_3" WHERE "lites_1_race_two_winning_team"='Gary Gibson';
```
## Task
Generate a SQL query to answer the following question:
`Who is the lites 2 race two winning team when #11 Performance Tech is the lites 1 race two winning team?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the lites 2 race two winning team when #11 Performance Tech is the lites 1 race two winning team?`:
```sql
                SELECT "lites_2_race_two_winning_team" FROM "table1_26638600_3" WHERE "lites_1_race_two_winning_team"='#11 Performance Tech';
```
## Task
Generate a SQL query to answer the following question:
`On which circuit was the lites 1 race one winning team #66 Gunnar Racing?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which circuit was the lites 1 race one winning team #66 Gunnar Racing?`:
```sql
                SELECT "circuit" FROM "table1_26638600_3" WHERE "lites_1_race_one_winning_team"='#66 Gunnar Racing';
```
## Task
Generate a SQL query to answer the following question:
`On which circuit was the lites race two winning team #13 Inspire Motorsports?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `On which circuit was the lites race two winning team #13 Inspire Motorsports?`:
```sql
                SELECT "circuit" FROM "table1_26638600_3" WHERE "lites_1_race_two_winning_team"='#13 Inspire Motorsports';
```
## Task
Generate a SQL query to answer the following question:
`Who was the lites 2 race two winning team when #13 Inspire Motorsports was the Lites 1 race one winning team?`

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

CREATE TABLE "table1_26638600_3" (
  "rnd" real,
  "circuit" text,
  "lites_1_race_one_winning_team" text,
  "lites_2_race_one_winning_team" text,
  "lites_1_race_two_winning_team" text,
  "lites_2_race_two_winning_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the lites 2 race two winning team when #13 Inspire Motorsports was the Lites 1 race one winning team?`:
```sql
                SELECT "lites_2_race_two_winning_team" FROM "table1_26638600_3" WHERE "lites_1_race_one_winning_team"='#13 Inspire Motorsports';
```
## Task
Generate a SQL query to answer the following question:
` What date did series number 32  premiere? `

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

CREATE TABLE "table1_2667438_5" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "prod_code" text
);
### SQL
Given the database schema, here is the SQL query that answers ` What date did series number 32  premiere? `:
```sql
                SELECT "original_air_date" FROM "table1_2667438_5" WHERE "no_in_series"=32;
```
## Task
Generate a SQL query to answer the following question:
`WHat is the highest difference?`

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

CREATE TABLE "table1_26677836_1" (
  "place" real,
  "nation" text,
  "played" real,
  "won" real,
  "drawn" real,
  "lost" real,
  "for" real,
  "against" real,
  "difference" real,
  "table_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `WHat is the highest difference?`:
```sql
                SELECT MAX("difference") FROM "table1_26677836_1";
```
## Task
Generate a SQL query to answer the following question:
`What is the nation when the for is 326?`

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

CREATE TABLE "table1_26677836_1" (
  "place" real,
  "nation" text,
  "played" real,
  "won" real,
  "drawn" real,
  "lost" real,
  "for" real,
  "against" real,
  "difference" real,
  "table_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nation when the for is 326?`:
```sql
                SELECT "nation" FROM "table1_26677836_1" WHERE "for"=326;
```
## Task
Generate a SQL query to answer the following question:
`What is the highest lost?`

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

CREATE TABLE "table1_26677836_1" (
  "place" real,
  "nation" text,
  "played" real,
  "won" real,
  "drawn" real,
  "lost" real,
  "for" real,
  "against" real,
  "difference" real,
  "table_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest lost?`:
```sql
                SELECT MAX("lost") FROM "table1_26677836_1";
```
## Task
Generate a SQL query to answer the following question:
`What is the nation when the place is 2?`

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

CREATE TABLE "table1_26677836_1" (
  "place" real,
  "nation" text,
  "played" real,
  "won" real,
  "drawn" real,
  "lost" real,
  "for" real,
  "against" real,
  "difference" real,
  "table_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the nation when the place is 2?`:
```sql
                SELECT "nation" FROM "table1_26677836_1" WHERE "place"=2;
```
## Task
Generate a SQL query to answer the following question:
`How many times is the nation [[|]] (19)?`

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

CREATE TABLE "table1_26677836_1" (
  "place" real,
  "nation" text,
  "played" real,
  "won" real,
  "drawn" real,
  "lost" real,
  "for" real,
  "against" real,
  "difference" real,
  "table_points" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many times is the nation [[|]] (19)?`:
```sql
                SELECT COUNT("against") FROM "table1_26677836_1" WHERE "nation"='[[|]] (19)';
```
## Task
Generate a SQL query to answer the following question:
`Which party does the incumbent Mathias Morris belong to?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which party does the incumbent Mathias Morris belong to?`:
```sql
                SELECT "party" FROM "pennsylvania" WHERE "incumbent"='Mathias Morris';
```
## Task
Generate a SQL query to answer the following question:
`Which district does the incumbent Luther Reily 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which district does the incumbent Luther Reily represent?`:
```sql
                SELECT "district" FROM "pennsylvania" WHERE "incumbent"='Luther Reily';
```
## Task
Generate a SQL query to answer the following question:
`Who are the candidates for the Pennsylvania 11 district?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the candidates for the Pennsylvania 11 district?`:
```sql
                SELECT "candidates" FROM "pennsylvania" WHERE "district"='Pennsylvania 11';
```
## Task
Generate a SQL query to answer the following question:
`How many people won the election in the Pennsylvania 11 district?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people won the election in the Pennsylvania 11 district?`:
```sql
                SELECT COUNT("candidates") FROM "pennsylvania" WHERE "district"='Pennsylvania 11';
```
## Task
Generate a SQL query to answer the following question:
`How many times did the incumbent was first elected and then lost re-election anti-masonic gain?`

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

CREATE TABLE "table1_2668173_4" (
  "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 the incumbent was first elected and then lost re-election anti-masonic gain?`:
```sql
                SELECT COUNT("first_elected") FROM "table1_2668173_4" WHERE "result"='Lost re-election Anti-Masonic gain';
```
## Task
Generate a SQL query to answer the following question:
`Who were the candidates if the incumbent was Henry Logan?`

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

CREATE TABLE "table1_2668173_4" (
  "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 if the incumbent was Henry Logan?`:
```sql
                SELECT "candidates" FROM "table1_2668173_4" WHERE "incumbent"='Henry Logan';
```
## Task
Generate a SQL query to answer the following question:
`What was the district of the incumbent Mathias Morris?`

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

CREATE TABLE "table1_2668173_4" (
  "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 district of the incumbent Mathias Morris?`:
```sql
                SELECT "district" FROM "table1_2668173_4" WHERE "incumbent"='Mathias Morris';
```
## Task
Generate a SQL query to answer the following question:
`How many incumbents was first elected in the Anti-Masonic party?`

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

CREATE TABLE "table1_2668173_4" (
  "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 incumbents was first elected in the Anti-Masonic party?`:
```sql
                SELECT COUNT("first_elected") FROM "table1_2668173_4" WHERE "party"='Anti-Masonic';
```
## Task
Generate a SQL query to answer the following question:
`Name the incumbent for robert monell (j) 63.6% tilly lynde 36.4%`

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

CREATE TABLE "table1_2668243_17" (
  "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 `Name the incumbent for robert monell (j) 63.6% tilly lynde 36.4%`:
```sql
                SELECT "incumbent" FROM "table1_2668243_17" WHERE "candidates"='Robert Monell (J) 63.6% Tilly Lynde 36.4%';
```
## Task
Generate a SQL query to answer the following question:
`Name the number of first elected for thomas maxwell (j) 60.1% david woodcock (aj) 39.9%`

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

CREATE TABLE "table1_2668243_17" (
  "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 `Name the number of first elected for thomas maxwell (j) 60.1% david woodcock (aj) 39.9%`:
```sql
                SELECT COUNT("first_elected") FROM "table1_2668243_17" WHERE "candidates"='Thomas Maxwell (J) 60.1% David Woodcock (AJ) 39.9%';
```
## Task
Generate a SQL query to answer the following question:
`Name the candidates for new york 21`

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

CREATE TABLE "table1_2668243_17" (
  "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 `Name the candidates for new york 21`:
```sql
                SELECT "candidates" FROM "table1_2668243_17" WHERE "district"='New York 21';
```
## Task
Generate a SQL query to answer the following question:
`Name the candidates for selah r. hobbie`

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

CREATE TABLE "table1_2668243_17" (
  "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 `Name the candidates for selah r. hobbie`:
```sql
                SELECT "candidates" FROM "table1_2668243_17" WHERE "incumbent"='Selah R. Hobbie';
```
## Task
Generate a SQL query to answer the following question:
`Name the result for  james lent (j) 52.3% silas wood (aj) 47.7%`

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

CREATE TABLE "table1_2668243_17" (
  "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 `Name the result for  james lent (j) 52.3% silas wood (aj) 47.7%`:
```sql
                SELECT "result" FROM "table1_2668243_17" WHERE "candidates"='James Lent (J) 52.3% Silas Wood (AJ) 47.7%';
```
## Task
Generate a SQL query to answer the following question:
`Who were the candidates in districk Pennsylvania 12?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the candidates in districk Pennsylvania 12?`:
```sql
                SELECT "candidates" FROM "pennsylvania" WHERE "district"='Pennsylvania 12';
```
## Task
Generate a SQL query to answer the following question:
`What is the result for district pennsylvania 6?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result for district pennsylvania 6?`:
```sql
                SELECT "result" FROM "pennsylvania" WHERE "district"='Pennsylvania 6';
```
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%?`:
```sql
                SELECT "incumbent" FROM "pennsylvania" WHERE "candidates"='John Banks (AM) 52.2% Samuel Power (J) 47.8%';
```
## Task
Generate a SQL query to answer the following question:
`How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?`:
```sql
                SELECT COUNT("first_elected") FROM "pennsylvania" WHERE "result"='Re-elected' AND "party"='Anti-Masonic' AND "district"='Pennsylvania 24';
```
## Task
Generate a SQL query to answer the following question:
`Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian?`:
```sql
                SELECT "candidates" FROM "pennsylvania" WHERE "result"='Re-elected' AND "first_elected"='1832' AND "party"='Jacksonian';
```
## Task
Generate a SQL query to answer the following question:
`In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850`

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

CREATE TABLE "competitive_history" (
  "year" real,
  "competition" text,
  "location" text,
  "apparatus" text,
  "rank_final" real,
  "score_final" text,
  "rank_qualifying" real,
  "score_qualifying" text
);
### SQL
Given the database schema, here is the SQL query that answers `In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850`:
```sql
                SELECT MAX("rank_qualifying") FROM "competitive_history" WHERE "location"='Ghent' AND "year"=2011 AND "score_qualifying"='14.850';
```
## Task
Generate a SQL query to answer the following question:
`What was the maximum rank-final score on the floor exercise?`

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

CREATE TABLE "competitive_history" (
  "year" real,
  "competition" text,
  "location" text,
  "apparatus" text,
  "rank_final" real,
  "score_final" text,
  "rank_qualifying" real,
  "score_qualifying" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the maximum rank-final score on the floor exercise?`:
```sql
                SELECT MAX("rank_final") FROM "competitive_history" WHERE "apparatus"='Floor Exercise';
```
## Task
Generate a SQL query to answer the following question:
`What was the maximum rank-final value for a score of 14.975?`

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

CREATE TABLE "competitive_history" (
  "year" real,
  "competition" text,
  "location" text,
  "apparatus" text,
  "rank_final" real,
  "score_final" text,
  "rank_qualifying" real,
  "score_qualifying" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the maximum rank-final value for a score of 14.975?`:
```sql
                SELECT MAX("rank_final") FROM "competitive_history" WHERE "score_final"='14.975';
```
## Task
Generate a SQL query to answer the following question:
`Where did the event with a final score of 15.050 occur?`

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

CREATE TABLE "competitive_history" (
  "year" real,
  "competition" text,
  "location" text,
  "apparatus" text,
  "rank_final" real,
  "score_final" text,
  "rank_qualifying" real,
  "score_qualifying" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where did the event with a final score of 15.050 occur?`:
```sql
                SELECT "location" FROM "competitive_history" WHERE "score_final"='15.050';
```
## Task
Generate a SQL query to answer the following question:
`how many "Party" are in district south carolina 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `how many "Party" are in district south carolina 2?`:
```sql
                SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 2';
```
## Task
Generate a SQL query to answer the following question:
`What "party" was re-elected in district South Carolina 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What "party" was re-elected in district South Carolina 7?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='South Carolina 7';
```
## Task
Generate a SQL query to answer the following question:
`who were the "candidate" of South Carolina 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `who were the "candidate" of South Carolina 6?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 6';
```
## Task
Generate a SQL query to answer the following question:
`Who was the "incumbent" of district south carolina 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the "incumbent" of district south carolina 7?`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 7';
```
## Task
Generate a SQL query to answer the following question:
`How many people were first elected when john roane 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people were first elected when john roane was the incumbent?`:
```sql
                SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Roane';
```
## Task
Generate a SQL query to answer the following question:
`What party did john s. barbour 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did john s. barbour represent?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John S. Barbour';
```
## Task
Generate a SQL query to answer the following question:
`What was the result of the election featuring andrew stevenson (j) 100%?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the election featuring andrew stevenson (j) 100%?`:
```sql
                SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Andrew Stevenson (J) 100%';
```
## Task
Generate a SQL query to answer the following question:
`What candidate(s) ran for election when nathaniel h. claiborne 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What candidate(s) ran for election when nathaniel h. claiborne was the incumbent?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Nathaniel H. Claiborne';
```
## Task
Generate a SQL query to answer the following question:
`Who was the ran as an incumbent leader first in 1818?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the ran as an incumbent leader first in 1818?`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1818';
```
## Task
Generate a SQL query to answer the following question:
`Who were the running candidates when Joshua Sands 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the running candidates when Joshua Sands was the incumbent?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Joshua Sands';
```
## Task
Generate a SQL query to answer the following question:
`What was the result of the election where stephen van rensselaer was the incumbent and the party represented was the adams-clay federalist 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the election where stephen van rensselaer was the incumbent and the party represented was the adams-clay federalist party?`:
```sql
                SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "party"='Adams-Clay Federalist' AND "incumbent"='Stephen Van Rensselaer';
```
## Task
Generate a SQL query to answer the following question:
`How many district has a candidate that was first elected on 1811?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many district has a candidate that was first elected on 1811?`:
```sql
                SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1811';
```
## Task
Generate a SQL query to answer the following question:
`In what district was the incumbent Charles A. Wickliffe? `

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what district was the incumbent Charles A. Wickliffe? `:
```sql
                SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles A. Wickliffe';
```
## Task
Generate a SQL query to answer the following question:
`What party did the incumbent Thomas P. Moore 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did the incumbent Thomas P. Moore belong to?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Thomas P. Moore';
```
## Task
Generate a SQL query to answer the following question:
`Who were the candidates in the Kentucky 9 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the candidates in the Kentucky 9 district? `:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 9';
```
## Task
Generate a SQL query to answer the following question:
`Who were the candidates in the Kentucky 5 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the candidates in the Kentucky 5 district? `:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 5';
```
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent when the candidate was william drayton (j)?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the incumbent when the candidate was william drayton (j)?`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='William Drayton (J)';
```
## Task
Generate a SQL query to answer the following question:
`What party did candidate george mcduffie (j) 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did candidate george mcduffie (j) represent?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "candidates"='George McDuffie (J)';
```
## Task
Generate a SQL query to answer the following question:
`What party did robert p. letcher 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did robert p. letcher represent?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert P. Letcher';
```
## Task
Generate a SQL query to answer the following question:
`What district(s) did henry clay 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What district(s) did henry clay represent?`:
```sql
                SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Henry Clay';
```
## Task
Generate a SQL query to answer the following question:
`Who were the candidates for election that had a result of a retired jacksonian gain?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the candidates for election that had a result of a retired jacksonian gain?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "result"='Retired Jacksonian gain';
```
## Task
Generate a SQL query to answer the following question:
`What ended up happening in the district Virginia 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What ended up happening in the district Virginia 22?`:
```sql
                SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 22';
```
## Task
Generate a SQL query to answer the following question:
`What party won the Virginia 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party won the Virginia 4 district?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 4';
```
## Task
Generate a SQL query to answer the following question:
`How many people won the election in the district of Virginia 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many people won the election in the district of Virginia 4?`:
```sql
                SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 4';
```
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent in the Virginia 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the incumbent in the Virginia 6 district?`:
```sql
                SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 6';
```
## Task
Generate a SQL query to answer the following question:
`What is Samuel Smith's 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is Samuel Smith's party?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Samuel Smith';
```
## Task
Generate a SQL query to answer the following question:
`what is Peter Little's 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is Peter Little's party?`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Peter Little';
```
## Task
Generate a SQL query to answer the following question:
`What was the result of Samuel Smith's race?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of Samuel Smith's race?`:
```sql
                SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Samuel Smith';
```
## Task
Generate a SQL query to answer the following question:
`Name the result for north carolina 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for north carolina 9`:
```sql
                SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='North Carolina 9';
```
## Task
Generate a SQL query to answer the following question:
`Name the party for hutchins g. burton`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the party for hutchins g. burton`:
```sql
                SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Hutchins G. Burton';
```
## Task
Generate a SQL query to answer the following question:
`Name the result for thomas h. hall (dr) 53.0% william clarke (f) 47.0%`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for thomas h. hall (dr) 53.0% william clarke (f) 47.0%`:
```sql
                SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Thomas H. Hall (DR) 53.0% William Clarke (F) 47.0%';
```
## Task
Generate a SQL query to answer the following question:
`Name the candidates for felix walker`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the candidates for felix walker`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Felix Walker';
```
## Task
Generate a SQL query to answer the following question:
`Who are the candidates when the incumbent is john pegram?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the candidates when the incumbent is john pegram?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Pegram';
```
## Task
Generate a SQL query to answer the following question:
`Who are the candidates for district virginia 12?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who are the candidates for district virginia 12?`:
```sql
                SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 12';
```
## Task
Generate a SQL query to answer the following question:
`What is the result when the candidates are alexander smyth (dr) 100%`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result when the candidates are alexander smyth (dr) 100%`:
```sql
                SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Alexander Smyth (DR) 100%';
```
## Task
Generate a SQL query to answer the following question:
`How many times is the candidates charles f. mercer (f) 100%?`

### 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" text,
  "result" text,
  "candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many times is the candidates charles f. mercer (f) 100%?`:
```sql
                SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Charles F. Mercer (F) 100%';
```
## Task
Generate a SQL query to answer the following question:
`how many times was the incumbent is john b. yates?`

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

CREATE TABLE "table1_2668347_14" (
  "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 `how many times was the incumbent is john b. yates?`:
```sql
                SELECT COUNT("party") FROM "table1_2668347_14" WHERE "incumbent"='John B. Yates';
```
## Task
Generate a SQL query to answer the following question:
`when was the first elected when the  candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?`

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

CREATE TABLE "table1_2668347_14" (
  "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 `when was the first elected when the  candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?`:
```sql
                SELECT "first_elected" FROM "table1_2668347_14" WHERE "candidates"='Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%';
```