output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Sparkman';
## Task Generate a SQL query to answer the following question: `what's the party with incumbent being john sparkman` ### 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 party with incumbent being john sparkman`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "candidates"='William B. Bankhead (D) 71.3% E. M. Reed (R) 28.7%';
## Task Generate a SQL query to answer the following question: ` how many dbeingtrict with candidates being william b. bankhead (d) 71.3% e. m. reed (r) 28.7%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers ` how many dbeingtrict with candidates being william b. bankhead (d) 71.3% e. m. reed (r) 28.7%`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William B. Bankhead';
## Task Generate a SQL query to answer the following question: `what's the party with incumbent being william b. bankhead` ### 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 party with incumbent being william b. bankhead`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1938;
## Task Generate a SQL query to answer the following question: `what's the district  with first elected being 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 `what's the district  with first elected being 1938`: ```sql
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1930;
## Task Generate a SQL query to answer the following question: `How many incumbents were first elected in 1930?` ### 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 incumbents were first elected in 1930?`: ```sql
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Dave E. Satterfield, Jr.';
## Task Generate a SQL query to answer the following question: `In how many districts is the incumbent Dave E. Satterfield, 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 `In how many districts is the incumbent Dave E. Satterfield, Jr.`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1918;
## Task Generate a SQL query to answer the following question: `What was the election result for the candidate first elected in 1918?` ### 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 election result for the candidate first elected in 1918?`: ```sql
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William B. Cravens';
## Task Generate a SQL query to answer the following question: `How many parties does william b. cravens 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 `How many parties does william b. cravens represent?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1932;
## Task Generate a SQL query to answer the following question: `What district had someone first elected in 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 district had someone first elected in 1932?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William J. Driver';
## Task Generate a SQL query to answer the following question: `What candidates ran in the election when the incumbent was william j. driver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What candidates ran in the election when the incumbent was william j. driver?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Sam Rayburn';
## Task Generate a SQL query to answer the following question: `Who are all the candidates when Sam Rayburn was incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Who are all the candidates when Sam Rayburn was incumbent?`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1919;
## Task Generate a SQL query to answer the following question: `What was the party that was frist elected in 1919?` ### 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 party that was frist elected in 1919?`: ```sql
SELECT MIN("first_elected") FROM "table1_1342315_12" WHERE "incumbent"='Leo E. Allen';
## Task Generate a SQL query to answer the following question: `When was incumbent Leo E. Allen first elected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1342315_12" ( "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 incumbent Leo E. Allen first elected?`: ```sql
SELECT "district" FROM "table1_1342315_12" WHERE "party"='Republican';
## Task Generate a SQL query to answer the following question: `Which district has a Republican elected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1342315_12" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Which district has a Republican elected?`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Riley Joseph Wilson';
## Task Generate a SQL query to answer the following question: `How many districts does riley joseph wilson?` ### 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 does riley joseph wilson?`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='René L. DeRouen';
## Task Generate a SQL query to answer the following question: `How many districts for rené l. derouen?` ### 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 for rené l. derouen?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Wright Patman';
## Task Generate a SQL query to answer the following question: `Who are the candidates in the race where Wright Patman is the incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Who are the candidates in the race where Wright Patman is the incumbent?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John S. Wood';
## Task Generate a SQL query to answer the following question: `What candidates ran in the election when john s. wood 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 candidates ran in the election when john s. wood was the incumbent?`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1914;
## Task Generate a SQL query to answer the following question: `What was the result of the election held 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 `What was the result of the election held in 1914?`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Claude Fuller';
## Task Generate a SQL query to answer the following question: `How many first elections have Claude Fuller as incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `How many first elections have Claude Fuller as incumbent?`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 1';
## Task Generate a SQL query to answer the following question: `How many winners were there in the Georgia 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 `How many winners were there in the Georgia 1 district?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 4';
## Task Generate a SQL query to answer the following question: `Who ran for office at the Georgia 4 district in this 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 ran for office at the Georgia 4 district in this election?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Riley Joseph Wilson';
## Task Generate a SQL query to answer the following question: `What district has Riley Joseph Wilson 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 `What district has Riley Joseph Wilson as the incumbent?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 6';
## Task Generate a SQL query to answer the following question: `What candidate is in Louisiana 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What candidate is in Louisiana 6?`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Richard M. Kleberg';
## Task Generate a SQL query to answer the following question: `what happened during the election for Richard M. Kleberg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `what happened during the election for Richard M. Kleberg?`: ```sql
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Fritz G. Lanham';
## Task Generate a SQL query to answer the following question: `What year was the first election when Fritz G. Lanham 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 year was the first election when Fritz G. Lanham was elected?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James P. Buchanan';
## Task Generate a SQL query to answer the following question: `What is the name of the candidate where the incumbent is named James P. Buchanan?` ### 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 name of the candidate where the incumbent is named James P. Buchanan?`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Oliver H. Cross';
## Task Generate a SQL query to answer the following question: `What party is incumbent Oliver H. Cross?` ### 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 is incumbent Oliver H. Cross?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William J. Driver';
## Task Generate a SQL query to answer the following question: `what's the district with incumbent being william j. driver` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the district with incumbent being william j. driver`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John E. Miller';
## Task Generate a SQL query to answer the following question: `what's the district with incumbent being john e. miller` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the district with incumbent being john e. miller`: ```sql
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1932;
## Task Generate a SQL query to answer the following question: ` how many incumbent with first elected being 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 ` how many incumbent with first elected being 1932`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 1';
## Task Generate a SQL query to answer the following question: `who is the the incumbent with dbeingtrict being arkansas 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 the incumbent with dbeingtrict being arkansas 1`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='David Delano Glover';
## Task Generate a SQL query to answer the following question: ` how many district  with incumbent being david delano glover` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers ` how many district  with incumbent being david delano glover`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Ben Cravens (D) Unopposed';
## Task Generate a SQL query to answer the following question: `who is the the incumbent with candidates being ben cravens (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 `who is the the incumbent with candidates being ben cravens (d) unopposed`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Denver S. Church';
## Task Generate a SQL query to answer the following question: `What was the result in the election in which the incumbent was Denver S. Church? ` ### 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 in which the incumbent was Denver S. Church? `: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ralph R. Eltse';
## Task Generate a SQL query to answer the following question: `What was the result in the election in which Ralph R. Eltse 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 in which Ralph R. Eltse was the incumbent?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1932 AND "district"='California 8';
## Task Generate a SQL query to answer the following question: `Who was the candidate in the election in the California 8 district where the incumbent was first elected in 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 `Who was the candidate in the election in the California 8 district where the incumbent was first elected in 1932? `: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Kansas 1';
## Task Generate a SQL query to answer the following question: `what are all the party with district being kansas 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `what are all the party with district being kansas 1`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Kansas 1';
## Task Generate a SQL query to answer the following question: `what's the result with district being kansas 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the result with district being kansas 1`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kansas 4';
## Task Generate a SQL query to answer the following question: `who are the candidates with district being kansas 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 `who are the candidates with district being kansas 4`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1922;
## Task Generate a SQL query to answer the following question: `what's the result with first elected being 1922` ### 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 first elected being 1922`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kansas 5';
## Task Generate a SQL query to answer the following question: `who is the the candidates with dbeingtrict being kansas 5` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `who is the the candidates with dbeingtrict being kansas 5`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Kansas 3';
## Task Generate a SQL query to answer the following question: ` how many first elected with district is kansas 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 ` how many first elected with district is kansas 3`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 2';
## Task Generate a SQL query to answer the following question: `What was the result of the election in the Arkansas 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 `What was the result of the election in the Arkansas 2 district? `: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 4';
## Task Generate a SQL query to answer the following question: `What was the result of the election in the Arkansas 4 district? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result of the election in the Arkansas 4 district? `: ```sql
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "district"='Arkansas 4';
## Task Generate a SQL query to answer the following question: `How many candidates ran in the election in the Arkansas 4 district? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `How many candidates ran in the election in the Arkansas 4 district? `: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William B. Oliver';
## Task Generate a SQL query to answer the following question: `How many districts does william b. oliver 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 `How many districts does william b. oliver represent?`: ```sql
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e";
## Task Generate a SQL query to answer the following question: `What is the last year that someone is 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 last year that someone is first elected?`: ```sql
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1929;
## Task Generate a SQL query to answer the following question: `How many people were elected in 1929` ### 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 people were elected in 1929`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1914;
## Task Generate a SQL query to answer the following question: `how many people won 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 `how many people won in 1914`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1927;
## Task Generate a SQL query to answer the following question: `Who won in 1927` ### 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 won in 1927`: ```sql
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 12';
## Task Generate a SQL query to answer the following question: `Name the number of incumbents for texas 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" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of incumbents for texas 12 `: ```sql
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles R. Crisp';
## Task Generate a SQL query to answer the following question: `How many parties were represented for Charles R. Crisp?` ### 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 were represented for Charles R. Crisp?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1916;
## Task Generate a SQL query to answer the following question: `In what district was the representative first elected in 1916?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `In what district was the representative first elected in 1916?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1922;
## Task Generate a SQL query to answer the following question: `Who were the candidates in the 1922 entry?` ### 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 1922 entry?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James O''Connor';
## Task Generate a SQL query to answer the following question: `In which district is James O'Connor the incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `In which district is James O'Connor the incumbent?`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Riley Joseph Wilson';
## Task Generate a SQL query to answer the following question: `To which party does Riley Joseph Wilson belong?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `To which party does Riley Joseph Wilson belong?`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "incumbent"='Hatton W. Sumners';
## Task Generate a SQL query to answer the following question: `How many of the first elected were listed when Hatton W. Sumners was incumbent and re-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 of the first elected were listed when Hatton W. Sumners was incumbent and re-elected?`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Finis J. Garrett';
## Task Generate a SQL query to answer the following question: `What was the result in the election where the incumbent was Finis J. Garrett? ` ### 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 the incumbent was Finis J. Garrett? `: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Cordell Hull';
## Task Generate a SQL query to answer the following question: `In what district was the incumbent Cordell hull? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `In what district was the incumbent Cordell hull? `: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 9';
## Task Generate a SQL query to answer the following question: `Who were the candidates in the election in the Tennessee 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" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the candidates in the election in the Tennessee 9 district? `: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='James A. Gallivan (D) Unopposed';
## Task Generate a SQL query to answer the following question: `What was the result of the election featuring james a. gallivan (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 was the result of the election featuring james a. gallivan (d) unopposed?`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John J. Douglass';
## Task Generate a SQL query to answer the following question: `How many districts does john j. douglass 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 `How many districts does john j. douglass represent?`: ```sql
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1912;
## Task Generate a SQL query to answer the following question: `how many areas were in the election in 1912` ### 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 areas were in the election in 1912`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles H. Brand';
## Task Generate a SQL query to answer the following question: `what is the affiliation of charles h. brand` ### 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 affiliation of charles h. brand`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Harry Lane Englebright';
## Task Generate a SQL query to answer the following question: `What candidates ran in the election that featured harry lane englebright?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What candidates ran in the election that featured harry lane englebright?`: ```sql
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William B. Oliver';
## Task Generate a SQL query to answer the following question: `When was incumbent William B. Oliver 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 incumbent William B. Oliver first elected?`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Percy E. Quin (D) Unopposed';
## Task Generate a SQL query to answer the following question: `who is the the incumbent with candidates being percy e. quin (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 `who is the the incumbent with candidates being percy e. quin (d) unopposed`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='John E. Rankin (D) Unopposed';
## Task Generate a SQL query to answer the following question: `what's the district with candidates being john e. rankin (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 district with candidates being john e. rankin (d) unopposed`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Mississippi 4';
## Task Generate a SQL query to answer the following question: `who is the the candidates with district being mississippi 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 `who is the the candidates with district being mississippi 4`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Mississippi 4';
## Task Generate a SQL query to answer the following question: `who is the incumbent for district mississippi 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 `who is the incumbent for district mississippi 4`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Bill G. Lowrey';
## Task Generate a SQL query to answer the following question: `what's the result with incumbent being bill g. lowrey` ### 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 incumbent being bill g. lowrey`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='William Madison Whittington (D) Unopposed';
## Task Generate a SQL query to answer the following question: `what's the district  with candidates being william madison whittington (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 district  with candidates being william madison whittington (d) unopposed`: ```sql
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Joseph T. Deal';
## Task Generate a SQL query to answer the following question: `What was the last year that incumbent joseph t. deal 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 was the last year that incumbent joseph t. deal was first elected?`: ```sql
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e";
## Task Generate a SQL query to answer the following question: `What year was someone 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 someone first elected?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edward Everett Eslick';
## Task Generate a SQL query to answer the following question: `What district does edward everett eslick 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 edward everett eslick represent?`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Cordell Hull';
## Task Generate a SQL query to answer the following question: `How many times was incumbent cordell hull 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 `How many times was incumbent cordell hull first elected?`: ```sql
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Joseph W. Byrns, Sr. (D) Unopposed';
## Task Generate a SQL query to answer the following question: `How many times was the election joseph w. byrns, sr. (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 times was the election joseph w. byrns, sr. (d) unopposed?`: ```sql
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jeff Busby';
## Task Generate a SQL query to answer the following question: `What is the least first elected for jeff busby?` ### 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 least first elected for jeff busby?`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1923;
## Task Generate a SQL query to answer the following question: `What was the party for first elected 1923?` ### 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 party for first elected 1923?`: ```sql
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='Mississippi 4';
## Task Generate a SQL query to answer the following question: `Name the total number of result for mississippi 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 total number of result for mississippi 4?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Gordon Lee';
## Task Generate a SQL query to answer the following question: `what is the section where gordon lee ran` ### 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 section where gordon lee ran`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Frank Park';
## Task Generate a SQL query to answer the following question: `what section did frank park run 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 section did frank park run in`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Georgia 5';
## Task Generate a SQL query to answer the following question: `who won in the race in the section georgia 5` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `who won in the race in the section georgia 5`: ```sql
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John N. Sandlin';
## Task Generate a SQL query to answer the following question: `How many candidates won the election of john n. sandlin?` ### 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 won the election of john n. sandlin?`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Henry Garland Dupré (D) Unopposed';
## Task Generate a SQL query to answer the following question: `Who was the incumbent in the election of henry garland dupré (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 `Who was the incumbent in the election of henry garland dupré (d) unopposed?`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John R. Tyson';
## Task Generate a SQL query to answer the following question: `What was the result when incumbent John R. Tyson 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 John R. Tyson was elected?`: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William J. Driver';
## Task Generate a SQL query to answer the following question: `Name the result for william j. driver` ### 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 william j. driver`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='William J. Driver';
## Task Generate a SQL query to answer the following question: `Name the district for william j. driver ` ### 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 district for william j. driver `: ```sql
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Chester W. Taylor';
## Task Generate a SQL query to answer the following question: `Name the lowest first elected for chester w. taylor` ### 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 lowest first elected for chester w. taylor`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Henry Garland Dupré';
## Task Generate a SQL query to answer the following question: `Who were the candidates when Henry Garland Dupré was incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the candidates when Henry Garland Dupré was incumbent?`: ```sql
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Henry Garland Dupré';
## Task Generate a SQL query to answer the following question: `How many candidates were there when Henry Garland Dupré 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 `How many candidates were there when Henry Garland Dupré was the incumbent? `: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James O''Connor';
## Task Generate a SQL query to answer the following question: `What district did James O'Connor 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 district did James O'Connor belong to?`: ```sql
SELECT "original_air_date" FROM "table1_13426649_1" WHERE "title"='\"Winterland\"';
## Task Generate a SQL query to answer the following question: `When did the episode titled "Winterland" air for the first time? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13426649_1" ( "num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `When did the episode titled "Winterland" air for the first time? `: ```sql
SELECT COUNT("original_air_date") FROM "table1_13426649_1" WHERE "num"=6;
## Task Generate a SQL query to answer the following question: `How many different original air dates did the episode number 6 have? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13426649_1" ( "num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many different original air dates did the episode number 6 have? `: ```sql
SELECT "written_by" FROM "table1_13426649_1" WHERE "production_code"='1ANJ01';
## Task Generate a SQL query to answer the following question: `Who wrote the episode with production code 1ANJ01?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13426649_1" ( "num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote the episode with production code 1ANJ01?`: ```sql
SELECT "location" FROM "table1_13456202_1" WHERE "mascot"='Panthers';
## Task Generate a SQL query to answer the following question: `What are the locations with a panthers mascot?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13456202_1" ( "school" text, "location" text, "founded" real, "affiliation" text, "mascot" text, "division" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the locations with a panthers mascot?`: ```sql
SELECT "location" FROM "table1_13456202_1" WHERE "mascot"='Eagles';
## Task Generate a SQL query to answer the following question: `What are the locations with an eagles macot?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13456202_1" ( "school" text, "location" text, "founded" real, "affiliation" text, "mascot" text, "division" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the locations with an eagles macot?`: ```sql
SELECT COUNT("affiliation") FROM "table1_13456202_1" WHERE "mascot"='Eagles';
## Task Generate a SQL query to answer the following question: `How many teams have an eagles mascot?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13456202_1" ( "school" text, "location" text, "founded" real, "affiliation" text, "mascot" text, "division" text ); ### SQL Given the database schema, here is the SQL query that answers `How many teams have an eagles mascot?`: ```sql
SELECT COUNT("affiliation") FROM "table1_13456202_1" WHERE "mascot"='Titans';
## Task Generate a SQL query to answer the following question: `How many teams have the titans as a mascot?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_13456202_1" ( "school" text, "location" text, "founded" real, "affiliation" text, "mascot" text, "division" text ); ### SQL Given the database schema, here is the SQL query that answers `How many teams have the titans as a mascot?`: ```sql