output
stringlengths 27
479
| instruction
stringlengths 407
1.39k
|
|---|---|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Albert Rains';
|
## Task
Generate a SQL query to answer the following question:
`What district is incumbent albert rains from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What district is incumbent albert rains from?`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Kenneth A. Roberts';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates represent the district of kenneth a. roberts?`
### 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 represent the district of kenneth a. roberts?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 2';
|
## Task
Generate a SQL query to answer the following question:
`Who was the incumbent in the Arkansas 2 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 incumbent in the Arkansas 2 district election? `:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 5';
|
## Task
Generate a SQL query to answer the following question:
`When was Dale Alford first elected in the Arkansas 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" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Dale Alford first elected in the Arkansas 5 district? `:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 3';
|
## Task
Generate a SQL query to answer the following question:
`When was James William Trimble first elected in the Arkansas 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 `When was James William Trimble first elected in the Arkansas 3 district? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 5';
|
## Task
Generate a SQL query to answer the following question:
`When party did the incumbent in the Arkansas 5 district 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 `When party did the incumbent in the Arkansas 5 district belong to? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 5';
|
## Task
Generate a SQL query to answer the following question:
`What was the result in the Arkansas 5 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 `What was the result in the Arkansas 5 district election? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 2';
|
## Task
Generate a SQL query to answer the following question:
`What party did the incumbent in the Arkansas 2 district belong to? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party did the incumbent in the Arkansas 2 district belong to? `:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William Jennings Bryan Dorn';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates were there in the election for William Jennings Bryan Dorn's seat?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many candidates were there in the election for William Jennings Bryan Dorn's seat?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e";
|
## Task
Generate a SQL query to answer the following question:
`What is the earliest year that a candidate was first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year that a candidate was first elected?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lindley Beckworth';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in which Lindley Beckworth 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 `What was the result of the election in which Lindley Beckworth was the incumbent?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1936;
|
## Task
Generate a SQL query to answer the following question:
`Which incumbent was first elected in 1936? `
### 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 1936? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Walter E. Rogers';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in which Walter E. Rogers 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 `What was the result of the election in which Walter E. Rogers was the incumbent? `:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Paul Rogers';
|
## Task
Generate a SQL query to answer the following question:
`When was Paul Rogers first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was Paul Rogers first elected?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James A. Haley';
|
## Task
Generate a SQL query to answer the following question:
`Which district is James A. Haley from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which district is James A. Haley from?`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e";
|
## Task
Generate a SQL query to answer the following question:
`What year were the latest elections?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year were the latest elections?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Bell Williams';
|
## Task
Generate a SQL query to answer the following question:
`In what district is the incumbent John Bell Williams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what district is the incumbent John Bell Williams?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Bell Williams';
|
## Task
Generate a SQL query to answer the following question:
`In what year was John Bell Williams first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what year was John Bell Williams first elected?`:
```sql
|
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='W. Arthur Winstead';
|
## Task
Generate a SQL query to answer the following question:
`How many districts have W. Arthur Winstead as elected official?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many districts have W. Arthur Winstead as elected official?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Carl Vinson';
|
## Task
Generate a SQL query to answer the following question:
`What is the district for carl vinson?`
### 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 carl vinson?`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James C. Davis';
|
## Task
Generate a SQL query to answer the following question:
`What is the most first elected for james c. davis?`
### 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 most first elected for james c. davis?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 4';
|
## Task
Generate a SQL query to answer the following question:
`What is the first elected for georgia 4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the first elected for georgia 4?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edwin E. Willis';
|
## Task
Generate a SQL query to answer the following question:
`which affiliation does edwin e. willis affiliate with`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `which affiliation does edwin e. willis affiliate with`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James H. Morrison';
|
## Task
Generate a SQL query to answer the following question:
`which affiliation is james h. morrison part of`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `which affiliation is james h. morrison part of`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1914;
|
## Task
Generate a SQL query to answer the following question:
`Who is the candidate that was first elected in 1914?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the candidate that was first elected in 1914?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Carl Vinson';
|
## Task
Generate a SQL query to answer the following question:
`In which district is the incumbent Carl Vinson?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In which district is the incumbent Carl Vinson?`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='L. Mendel Rivers';
|
## Task
Generate a SQL query to answer the following question:
`Name the candidates for l. mendel rivers`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the candidates for l. mendel rivers`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 4';
|
## Task
Generate a SQL query to answer the following question:
`Name the result for south carolina 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for south carolina 4`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 3';
|
## Task
Generate a SQL query to answer the following question:
`Name the candidates for south carolina 3`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the candidates for south carolina 3`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1956;
|
## Task
Generate a SQL query to answer the following question:
`Name the incumbent for first elected 1956`
### 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 1956`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James William Trimble';
|
## Task
Generate a SQL query to answer the following question:
`Name the number of party with the incubent james william trimble`
### 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 number of party with the incubent james william trimble`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1944;
|
## Task
Generate a SQL query to answer the following question:
`What is the result for first elected in 1944`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the result for first elected in 1944`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 1';
|
## Task
Generate a SQL query to answer the following question:
`What is the number of party in the arkansas 1 district`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the number of party in the arkansas 1 district`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Alabama 6';
|
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent in the Alabama 6 voting district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the incumbent in the Alabama 6 voting district?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Frank W. Boykin';
|
## Task
Generate a SQL query to answer the following question:
`Which candidates were in the election where Frank W. Boykin was an 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 `Which candidates were in the election where Frank W. Boykin was an incumbent?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='George M. Grant';
|
## Task
Generate a SQL query to answer the following question:
`Who were the candidates in the election where the incumbent is George M. Grant?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who were the candidates in the election where the incumbent is George M. Grant?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Alabama 6';
|
## Task
Generate a SQL query to answer the following question:
`Which candidates ran in the Alabama 6 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which candidates ran in the Alabama 6 district?`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Alabama 4';
|
## Task
Generate a SQL query to answer the following question:
`What is the latest year listed with the Alabama 4 voting 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 is the latest year listed with the Alabama 4 voting district?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Fred E. Busbey';
|
## Task
Generate a SQL query to answer the following question:
`What was the result when incumbent Fred E. Busbey was elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when incumbent Fred E. Busbey was elected?`:
```sql
|
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Noah M. Mason';
|
## Task
Generate a SQL query to answer the following question:
`How many results are listed for the election where Noah M. Mason was elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many results are listed for the election where Noah M. Mason was elected?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Leo E. Allen';
|
## Task
Generate a SQL query to answer the following question:
`What was the result when Leo E. Allen was elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result when Leo E. Allen was elected?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1914;
|
## Task
Generate a SQL query to answer the following question:
`Which party had a person who has been in the seat since 1914?`
### 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 had a person who has been in the seat since 1914?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Prince Hulon Preston, Jr.';
|
## Task
Generate a SQL query to answer the following question:
`Name all the candidates listed in the race where the incumbent is Prince Hulon Preston, Jr.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name all the candidates listed in the race where the incumbent is Prince Hulon Preston, Jr.`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='J. L. Pilcher';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates ran in the race where the incumbent is J. L. Pilcher?`
### 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 ran in the race where the incumbent is J. L. Pilcher?`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John W. Heselton';
|
## Task
Generate a SQL query to answer the following question:
`John W. Heselton was first elected in what year?`
### 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 `John W. Heselton was first elected in what year?`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Thomas J. Lane';
|
## Task
Generate a SQL query to answer the following question:
`Thomas J. Lane is the incumbent of how many parties?`
### 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 `Thomas J. Lane is the incumbent of how many parties?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1944;
|
## Task
Generate a SQL query to answer the following question:
`Who is the incumbent first elected in 1944?`
### 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 first elected in 1944?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1942;
|
## Task
Generate a SQL query to answer the following question:
`What was the result for the politician first elected in 1942?`
### 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 for the politician first elected in 1942?`:
```sql
|
SELECT "result" FROM "table1_1342013_34" WHERE "district"='Ohio 2';
|
## Task
Generate a SQL query to answer the following question:
`what's the result for district ohio 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1342013_34" (
"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 for district ohio 2`:
```sql
|
SELECT "incumbent" FROM "table1_1342013_34" WHERE "candidates"='John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%';
|
## Task
Generate a SQL query to answer the following question:
`who is the the incumbent with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1342013_34" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the the incumbent with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%`:
```sql
|
SELECT "incumbent" FROM "table1_1342013_34" WHERE "district"='Ohio 2';
|
## Task
Generate a SQL query to answer the following question:
`who is the the incumbent with district being ohio 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1342013_34" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the the incumbent with district being ohio 2`:
```sql
|
SELECT "result" FROM "table1_1342013_34" WHERE "incumbent"='William H. Ayres';
|
## Task
Generate a SQL query to answer the following question:
`what's the result with incumbent being william h. ayres`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1342013_34" (
"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 incumbent being william h. ayres`:
```sql
|
SELECT COUNT("party") FROM "table1_1342013_34" WHERE "candidates"='John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%';
|
## Task
Generate a SQL query to answer the following question:
` how many party with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "table1_1342013_34" (
"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 candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Brooks Hays';
|
## Task
Generate a SQL query to answer the following question:
`what district is Brooks Hays in`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what district is Brooks Hays in`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Omar Burleson';
|
## Task
Generate a SQL query to answer the following question:
`Omar Burleson was the incumbent in what 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 `Omar Burleson was the incumbent in what district? `:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1938;
|
## Task
Generate a SQL query to answer the following question:
`In what district was incumbent first elected in 1938? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In what district was incumbent first elected in 1938? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 25';
|
## Task
Generate a SQL query to answer the following question:
`Name the party for the pennsylvania 25`
### 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 party for the pennsylvania 25`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Alvin Bush';
|
## Task
Generate a SQL query to answer the following question:
`Name the minumim first elected for alvin bush`
### 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 minumim first elected for alvin bush`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 15';
|
## Task
Generate a SQL query to answer the following question:
`What is the incumbent for pennsylvania 15`
### 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 pennsylvania 15`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Noah M. Mason';
|
## Task
Generate a SQL query to answer the following question:
`What are the candidates for noah m. mason?`
### 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 are the candidates for noah m. mason?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Fred E. Busbey';
|
## Task
Generate a SQL query to answer the following question:
`What is the candidates for fred e. busbey?`
### 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 candidates for fred e. busbey?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1932;
|
## Task
Generate a SQL query to answer the following question:
`What is the incumbent for 1932?`
### 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 1932?`:
```sql
|
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles Edward Bennett';
|
## Task
Generate a SQL query to answer the following question:
` how many first elected with incumbent being charles edward bennett`
### 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 first elected with incumbent being charles edward bennett`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Florida 2';
|
## Task
Generate a SQL query to answer the following question:
`who is the the incumbent with dbeingtrict being florida 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the the incumbent with dbeingtrict being florida 2`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Charles Edward Bennett (D) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`what's the result with candidates being charles edward bennett (d) unopposed`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the result with candidates being charles edward bennett (d) unopposed`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Florida 4';
|
## Task
Generate a SQL query to answer the following question:
`what's the result with dbeingtrict being florida 4`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `what's the result with dbeingtrict being florida 4`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Charles Edward Bennett (D) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
` how many party with candidates being charles edward bennett (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 ` how many party with candidates being charles edward bennett (d) unopposed`:
```sql
|
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William C. Lantaff';
|
## Task
Generate a SQL query to answer the following question:
` how many first elected with incumbent being william c. lantaff`
### 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 first elected with incumbent being william c. lantaff`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tic Forrester';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election when Tic Forrester ran as an incumbent?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the result of the election when Tic Forrester ran as an incumbent?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Craig Hosmer';
|
## Task
Generate a SQL query to answer the following question:
`What was the final result for Craig Hosmer?`
### 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 Craig Hosmer?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Harlan Hagen';
|
## Task
Generate a SQL query to answer the following question:
`What district does Harlan Hagen 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 district does Harlan Hagen represent?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 2';
|
## Task
Generate a SQL query to answer the following question:
`Who was the candidate in the election in the Louisiana 2 district? `
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the candidate in the election in the Louisiana 2 district? `:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='Louisiana 5';
|
## Task
Generate a SQL query to answer the following question:
`What candidate was re-elected in the Louisiana 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" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What candidate was re-elected in the Louisiana 5 district? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='Louisiana 6';
|
## Task
Generate a SQL query to answer the following question:
`What party's candidate was re-elected in the Louisiana 6 district?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What party's candidate was re-elected in the Louisiana 6 district?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Hale Boggs';
|
## Task
Generate a SQL query to answer the following question:
`What was the result in the election where Hale Boggs 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 `What was the result in the election where Hale Boggs was the incumbent? `:
```sql
|
SELECT "channel_width" FROM "b_802_11_channel_to_frequency_map" WHERE "overlaps_channels"='1,3-6';
|
## Task
Generate a SQL query to answer the following question:
`what is the channel width that overlaps channels 1,3-6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "b_802_11_channel_to_frequency_map" (
"channel" real,
"center_frequency" text,
"frequency_delta" text,
"channel_width" text,
"overlaps_channels" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the channel width that overlaps channels 1,3-6?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Mississippi 2';
|
## Task
Generate a SQL query to answer the following question:
`Name the result for mississippi 2`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for mississippi 2`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1941;
|
## Task
Generate a SQL query to answer the following question:
`Name the number of candidates for 1941`
### 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 number of candidates for 1941`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "result"='Lost renomination Democratic loss';
|
## Task
Generate a SQL query to answer the following question:
`Name the candidates for result of lost renomination democratic loss`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the candidates for result of lost renomination democratic loss`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1920;
|
## Task
Generate a SQL query to answer the following question:
`Name the result for first elected of 1920`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Name the result for first elected of 1920`:
```sql
|
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 7';
|
## Task
Generate a SQL query to answer the following question:
`In the District Tennessee 7 what is the number of first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `In the District Tennessee 7 what is the number of first elected?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Tom J. Murray (D) Unopposed';
|
## Task
Generate a SQL query to answer the following question:
`What is the candidates result that is tom j. murray (d) unopposed?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the candidates result that is tom j. murray (d) unopposed?`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "party"='Republican';
|
## Task
Generate a SQL query to answer the following question:
`For the Republican party what are the names of the incumbents?`
### 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 `For the Republican party what are the names of the incumbents?`:
```sql
|
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Howard Baker, Sr. (R) 68.9% Boyd W. Cox (D) 31.1%';
|
## Task
Generate a SQL query to answer the following question:
`How many parties match the canididates listed as howard baker, sr. (r) 68.9% boyd w. cox (d) 31.1%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many parties match the canididates listed as howard baker, sr. (r) 68.9% boyd w. cox (d) 31.1%?`:
```sql
|
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Paul B. Dague';
|
## Task
Generate a SQL query to answer the following question:
`Which district had Paul B. Dague as 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 `Which district had Paul B. Dague as the incumbent?`:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1942';
|
## Task
Generate a SQL query to answer the following question:
`What was the result in the election where the incumbent was first elected in 1942? `
### 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 in the election where the incumbent was first elected in 1942? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 3';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in the Texas 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" text,
"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 Texas 3 district? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Wright Patman';
|
## Task
Generate a SQL query to answer the following question:
`What party did incumbent Wright Patman 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 incumbent Wright Patman belong to? `:
```sql
|
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 4';
|
## Task
Generate a SQL query to answer the following question:
`What was the result of the election in the Texas 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 was the result of the election in the Texas 4 district? `:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='Texas 11';
|
## Task
Generate a SQL query to answer the following question:
`What party did the re-elected incumbent of the Texas 11 district 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 re-elected incumbent of the Texas 11 district belong to?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='California 22';
|
## Task
Generate a SQL query to answer the following question:
`List all those first elected in the California 22 voting 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 `List all those first elected in the California 22 voting district.`:
```sql
|
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1946';
|
## Task
Generate a SQL query to answer the following question:
`Who was the first elected incumbent in the 1946 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" text,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the first elected incumbent in the 1946 election?`:
```sql
|
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='California 29';
|
## Task
Generate a SQL query to answer the following question:
`How many results does the California 29 voting district have?`
### 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 results does the California 29 voting district have?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Clair Engle';
|
## Task
Generate a SQL query to answer the following question:
`Which party had Clair Engle as an 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 `Which party had Clair Engle as an incumbent?`:
```sql
|
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Sid Simpson';
|
## Task
Generate a SQL query to answer the following question:
`What party does sid simpson 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 does sid simpson represent?`:
```sql
|
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Barratt O''Hara';
|
## Task
Generate a SQL query to answer the following question:
`How many candidates ran against barratt o'hara?`
### 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 ran against barratt o'hara?`:
```sql
|
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Barratt O''Hara';
|
## Task
Generate a SQL query to answer the following question:
`What year was incumbent barratt o'hara first elected?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was incumbent barratt o'hara first elected?`:
```sql
|
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Noble Jones Gregory';
|
## Task
Generate a SQL query to answer the following question:
`How many results for minimum first elected incumbent Noble Jones Gregory?`
### 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 results for minimum first elected incumbent Noble Jones Gregory?`:
```sql
|
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Noble Jones Gregory';
|
## Task
Generate a SQL query to answer the following question:
`How many results for incumbent Noble Jones Gregory?`
### 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 results for incumbent Noble Jones Gregory?`:
```sql
|
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 1';
|
## Task
Generate a SQL query to answer the following question:
`Who is the candidate wehre district is louisiana 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 candidate wehre district is louisiana 1?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.