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