chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the party where the incumbent is overton brooks?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Overton Brooks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who athe party where district is louisiana 2?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the candidate where district is louisiana 3?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is the minimum number first elected to district louisiana 5?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result when incumbent Tom Steed was elected?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Tom Steed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the candidates for hardie scott" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Hardie Scott';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the number of candidates for pennsylvania 3" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the number of candidates for pennsylvania 21" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the party for first elected 1948 for william t. granahan" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1948 AND \"incumbent\"='William T. Granahan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates were there in the race where Cecil R. King is the incumbent?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Cecil R. King';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts have an incumbent first elected in 1944?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1944;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342218_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent in the Illinois 17 district?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"table1_1342218_13\" WHERE \"district\"='Illinois 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many people on this list are named thomas abernethy?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Thomas Abernethy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was w. arthur winstead first elected?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='W. Arthur Winstead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was william m. colmer winstead first elected?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William M. Colmer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election with jamie l. whitten?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Jamie L. Whitten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidate was re-elected and was first elected in 1942? " }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Re-elected' AND \"first_elected\"=1942;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates in the election in the Ohio 9 district? " }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was incumbent Michael A. Feighan first elected? " }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Michael A. Feighan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party does the incumbent from the Ohio 5 district belong to? " }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party does the incumbent from the Ohio 20 district belong to? " }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party does the incumbent from the Ohio 7 district belong to? " }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who is the candidate for the district Arkansas 2?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Arkansas 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which district has the incumbent Wilbur Mills and a re-elected result?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Re-elected' AND \"incumbent\"='Wilbur Mills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was first-elected for the row of Texas 2?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Texas 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result for the incumbent Milton H. West?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Milton H. West';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party is associated with Texas 2?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Texas 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When the result is retired to run for U.S. Senate Democratic Hold, who is the candidate?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Retired to run for U.S. Senate Democratic hold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidate has a result of being re-elected in the Texas 7 District?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Re-elected' AND \"district\"='Texas 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_11\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which party is associated with the candidate Albert Sidney Camp (D) unopposed?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"table1_1342233_11\" WHERE \"candidates\"='Albert Sidney Camp (D) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_11\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which district is associated with the incumbent Carl Vinson?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342233_11\" WHERE \"incumbent\"='Carl Vinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_11\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which candidates are associated with the Georgia 7 district?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342233_11\" WHERE \"district\"='Georgia 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_11\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidate is associated with the Georgia 4 district?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342233_11\" WHERE \"district\"='Georgia 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was incumbent joe b. bates first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Joe B. Bates';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party is incumbent virgil chapman from?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Virgil Chapman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was clair engle first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Clair Engle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is the result of the first elected is 1943?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1943;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what the the end number where albert rains was running" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Albert Rains';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what the was the final in which frank w. boykin was running" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Frank W. Boykin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the total number of first elected for sol bloom" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Sol Bloom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the candidates for ellsworth b. buck" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ellsworth B. Buck';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What are the candidates for new york 35?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the party for new york 20?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_43\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election featuring r. ewing thomason (d) unopposed?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_1342233_43\" WHERE \"candidates\"='R. Ewing Thomason (D) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_43\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district is eugene worley from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1342233_43\" WHERE \"incumbent\"='Eugene Worley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0result\u00a0with\u00a0candidates\u00a0being richard j. welch (r) unopposed" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"table1_1342233_6\" WHERE \"candidates\"='Richard J. Welch (R) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0incumbent\u00a0being jack z. anderson" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_1342233_6\" WHERE \"incumbent\"='Jack Z. Anderson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district with\u00a0result\u00a0being re-elected and\u00a0candidates\u00a0being clarence f. lea (d) unopposed" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1342233_6\" WHERE \"result\"='Re-elected' AND \"candidates\"='Clarence F. Lea (D) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0first elected\u00a0with\u00a0incumbent\u00a0being clair engle" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"table1_1342233_6\" WHERE \"incumbent\"='Clair Engle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0candidates\u00a0with\u00a0incumbent\u00a0being alfred j. elliott" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342233_6\" WHERE \"incumbent\"='Alfred J. Elliott';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342233_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being jack z. anderson (r) unopposed" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"table1_1342233_6\" WHERE \"candidates\"='Jack Z. Anderson (R) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties does incumbent carl vinson represent?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Carl Vinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties does incumbent stephen pace represent?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Stephen Pace';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342249_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates when Noah M. Mason was incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342249_13\" WHERE \"incumbent\"='Noah M. Mason';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342249_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In what year was Leo E. Allen first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"table1_1342249_13\" WHERE \"incumbent\"='Leo E. Allen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342249_13\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates when Sid Simpson was the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1342249_13\" WHERE \"incumbent\"='Sid Simpson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of Robert L. F. Sikes' election bid?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Robert L. F. Sikes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts have an incumbent first elected in 1940?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1940;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many races involve incumbent Pat Cannon?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Pat Cannon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which incumbent was first elected in 1940?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1940;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the first electedfor district ohio 18" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the incumbent for ohio 12?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are all of the candidates in the election featuring james r. domengeaux?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='James R. Domengeaux';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name all the candidates that ran for the seat where Harold D. Cooley is the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Harold D. Cooley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many partys have a candidate first elected in 1923?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1923;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what was the number of candidates when Leon Sacks was incumbent?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Leon Sacks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in Pennsylvania 13?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent in Pennsylvania 27?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the contenders In the New York 19 polling area race?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many polling areas are there with John Taber as the sitting Representative?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John Taber';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the contenders In the New York 29 polling area race?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which political party is involved where John J. Delaney is the sitting Representative?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John J. Delaney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who is the sitting Representative In the New York 10 polling area race?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many sitting Representatives are there in the New York 10 polling area?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='New York 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the district for james p. richards?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='James P. Richards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the candidate for south carolina 4?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the candidate for south carolina 3?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the first elected for south carolina 4?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates were in the election featuring brooks hays (d) unopposed?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Brooks Hays (D) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party does clyde t. ellis represent?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Clyde T. Ellis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0party\u00a0with\u00a0candidates\u00a0being john j. phillips (r) 57.6% n. e. west (d) 42.4%" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='John J. Phillips (R) 57.6% N. E. West (D) 42.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0dbeingtrict\u00a0being california 10" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='California 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0first elected\u00a0being 1926" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"='1926';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0incumbent\u00a0with\u00a0result\u00a0being new seat republican gain" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='New seat Republican gain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what was the maxiumum for the first elected?" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0first elected\u00a0with\u00a0incumbent\u00a0being joe starnes" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Joe Starnes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0first elected\u00a0with\u00a0candidates\u00a0being joe starnes (d) 100.0% george bogus ( w/i ) 0.003%" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Joe Starnes (D) 100.0% George Bogus ( W/I ) 0.003%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0party\u00a0with\u00a0dbeingtrict\u00a0being alabama 6" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Alabama 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what are all the\u00a0district with\u00a0incumbent\u00a0being sam hobbs" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Sam Hobbs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what are all the\u00a0result\u00a0with\u00a0district being alabama 1" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Alabama 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is the maximum\u00a0first elected\u00a0with\u00a0district being alabama 5" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Alabama 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342270_42\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the Tennessee 6 district election?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_1342270_42\" WHERE \"district\"='Tennessee 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342270_42\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In how many districts was the incumbent Estes Kefauver? " }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"table1_1342270_42\" WHERE \"incumbent\"='Estes Kefauver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342270_42\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the latest year any of the incumbents were first elected? " }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"table1_1342270_42\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1342270_42\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the Tennessee 2 district election? " }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_1342270_42\" WHERE \"district\"='Tennessee 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district is incumbent robert l. mouton from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Robert L. Mouton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: William Fadjo Cravens is the only candidate who was first elected in 1939." }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William Fadjo Cravens';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: William Fadjo Cravens serves the fourth district of Arkansas." }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William Fadjo Cravens';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0district being alabama 3" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Alabama 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being sam hobbs (d) 88.2% c. w. mckay (r) 11.8%" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Sam Hobbs (D) 88.2% C. W. McKay (R) 11.8%';" } ]