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