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 incumbent for 1974?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1974;" } ]
[ { "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: To what party does Cardiss Collins belong?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Cardiss Collins';" } ]
[ { "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 Virginia 3 district election? " }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 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 was the result of the election in the Virginia 3 district?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 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: Who were the candidates when Lamar S. Smith was incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Lamar S. Smith';" } ]
[ { "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 Beau Boulter represent?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Beau Boulter';" } ]
[ { "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 when Jack Fields was the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Jack Fields';" } ]
[ { "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 Les Aspin?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Les Aspin';" } ]
[ { "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 that ran when Jim Moody was up for reelection after 1982?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1982;" } ]
[ { "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 called Tennessee 6, how many in total of first elected are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" 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 \"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 is associated with the person who was first elected in 1982?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1982;" } ]
[ { "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 are listed all together for the incumbent named bob clement?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Bob Clement';" } ]
[ { "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 results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Bart Gordon (D) 76.5% Wallace Embry (R) 23.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: Who is the incumbent that is listed with the candidates listed as marilyn lloyd (d) 57.4% harold w. coker (r) 42.6%?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Marilyn Lloyd (D) 57.4% Harold W. Coker (R) 42.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: In what district would you find the candidates listed as jim cooper (d) unopposed?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Jim Cooper (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: who is the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being bud shuster (r) unopposed" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Bud Shuster (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: who is the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being tom ridge (r) 80.9% joylyn blackwell (d) 19.1%" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Tom Ridge (R) 80.9% Joylyn Blackwell (D) 19.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's\u00a0district with\u00a0candidates\u00a0being curt weldon (r) 61.3% bill spingler (d) 38.7%" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Curt Weldon (R) 61.3% Bill Spingler (D) 38.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's\u00a0party\u00a0with\u00a0district being pennsylvania 21" }, { "role": "assistant", "content": "SELECT \"party\" 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 maximum\u00a0first elected\u00a0with incumbent\u00a0being gus yatron" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Gus Yatron';" } ]
[ { "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\u00a0the district with\u00a0first elected\u00a0being 1972" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1972;" } ]
[ { "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\u00a0district with\u00a0incumbent\u00a0being lindy boggs" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Lindy Boggs';" } ]
[ { "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 billy tauzin (d) unopposed" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Billy Tauzin (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\u00a0candidates\u00a0with\u00a0result\u00a0being retired to run for u. s. senate republican hold" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Retired to run for U. S. Senate Republican 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's the\u00a0result\u00a0with\u00a0district being louisiana 2" }, { "role": "assistant", "content": "SELECT \"result\" 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 the\u00a0candidates\u00a0with\u00a0first elected\u00a0being 1977" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1977;" } ]
[ { "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 happened to the incombent who was elected in 1980?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1980;" } ]
[ { "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 did the election end for Terry L. Bruce?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Terry L. Bruce';" } ]
[ { "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 was Tony P. Hall affiliated with?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Tony P. Hall';" } ]
[ { "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 number first elected for tennessee 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" 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: Name the candidates in 1964" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1964;" } ]
[ { "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 Mac Sweeney as incumbent?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Mac Sweeney';" } ]
[ { "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 the candidates vying for Henry B. Gonzalez' seat?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Henry B. Gonzalez';" } ]
[ { "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 vying for Albert Bustamante's seat." }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Albert Bustamante';" } ]
[ { "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 the incumbent Michael Bilirakis? " }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Michael Bilirakis';" } ]
[ { "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 in election where the incumbent was first elected in 1980? " }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1980;" } ]
[ { "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 incumbent Charles Edward Bennett belong to? " }, { "role": "assistant", "content": "SELECT \"party\" 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: What was the result of the election in the Florida 18 district? " }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Florida 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: In what district is the incumbent Lawrence J. Smith? " }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Lawrence J. Smith';" } ]
[ { "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: where is the district where the incumbent is del latta?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Del Latta';" } ]
[ { "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 district ohio 11?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 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\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who were the candidates for district ohio 6?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Ohio 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 party for District Georgia 9?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Georgia 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: Which district shows a first elected of 1980?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1980;" } ]
[ { "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 the incumbent Wyche Fowler?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Wyche Fowler';" } ]
[ { "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 shown as candidates when George Darden is the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='George Darden';" } ]
[ { "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 has Dan Crane as incumbent?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Dan Crane';" } ]
[ { "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 Robert W. Edgar the incumbent?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Robert W. Edgar';" } ]
[ { "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: To which party does Robert W. Edgar belong?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Robert W. Edgar';" } ]
[ { "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 jack hightower from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Jack Hightower';" } ]
[ { "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 election results tom loeffler (r) 80.6% joe sullivan (d) 19.4%?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Tom Loeffler (R) 80.6% Joe Sullivan (D) 19.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 incumbent won the district of texas 22?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Texas 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\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who's the incumbent of the Louisiana 1 district?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 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 were the candidates in the Louisiana 4 district?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 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: Who's the incumbent in the district first elected in 1976?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_22\" (\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\u00a0district being massachusetts 2" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"table1_1341604_22\" WHERE \"district\"='Massachusetts 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_22\" (\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\u00a0candidates\u00a0being silvio conte (r) unopposed" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"table1_1341604_22\" WHERE \"candidates\"='Silvio Conte (R) Unopposed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_22\" (\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 joseph d. early" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"table1_1341604_22\" WHERE \"incumbent\"='Joseph D. Early';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_22\" (\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 massachusetts 2" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"table1_1341604_22\" WHERE \"district\"='Massachusetts 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_22\" (\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\u00a0dbeingtrict\u00a0being massachusetts 3" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"table1_1341604_22\" WHERE \"district\"='Massachusetts 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_39\" (\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 won the election in the district whose incumbent is Bud Shuster?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"table1_1341604_39\" WHERE \"incumbent\"='Bud Shuster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_39\" (\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 in the district whose incumbent is Gus Yatron?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1341604_39\" WHERE \"incumbent\"='Gus Yatron';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341604_39\" (\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 winning party in the Pennsylvania 6 district?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"table1_1341604_39\" WHERE \"district\"='Pennsylvania 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 candidate is a member of the Republican party?" }, { "role": "assistant", "content": "SELECT \"candidates\" 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: What district is Ray Musto the incumbent of?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ray Musto';" } ]
[ { "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 the incumbent Donald A. Bailey a member of?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Donald A. Bailey';" } ]
[ { "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 outcome of the election in Pennsylvania 6 district?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 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: Where was Al Gore elected" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Al Gore';" } ]
[ { "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: Election results of 1976" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1976;" } ]
[ { "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 incumbent for missouri 1?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Missouri 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 was the result of the election when someone was first elected in 1960?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1960;" } ]
[ { "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 phil crane first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Phil Crane';" } ]
[ { "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 candidates were featured in the 1974 election?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1974;" } ]
[ { "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 Jerry Huckaby first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Jerry Huckaby';" } ]
[ { "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 other cadidate ran against Dave Treen?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Dave Treen';" } ]
[ { "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 the earliest 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 district did Dave Treen serve?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Dave Treen';" } ]
[ { "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 politicians were originally elected in 1972?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1972;" } ]
[ { "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 Georgia 6 district, what is the elected party?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Georgia 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: In the race involving Billy Lee Evans as the seated Representative, was he elected again?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Billy Lee Evans';" } ]
[ { "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 Ronald \"bo\" Ginn as the seated Representative?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ronald \\\"Bo\\\" Ginn';" } ]
[ { "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 are there in races involving Dawson Mathis?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Dawson Mathis';" } ]
[ { "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 republican?" }, { "role": "assistant", "content": "SELECT \"district\" 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: Name the result when the incumbent was george h. mahon" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='George H. Mahon';" } ]
[ { "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 incumbent of texas 3?" }, { "role": "assistant", "content": "SELECT \"incumbent\" 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\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the incumbent for texas 19?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Texas 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: Which district has candidates is dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.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 result for the district missouri 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Missouri 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 the first elected for district missouri 7?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Missouri 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: When was the earliest first election?" }, { "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: How many times was the candidates dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_33\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district did S. William Green belong to?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1341663_33\" WHERE \"incumbent\"='S. William Green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_33\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1341663_33\" WHERE \"party\"='Democratic' AND \"first_elected\"=1974 AND \"incumbent\"='Stephen J. Solarz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_33\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When was Stephen J. Solarz first elected?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"table1_1341663_33\" WHERE \"incumbent\"='Stephen J. Solarz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_33\" (\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 Shirley Chisholm was the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_1341663_33\" WHERE \"incumbent\"='Shirley Chisholm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_6\" (\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 that has Bob Wilson as an incumbent?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1341663_6\" WHERE \"incumbent\"='Bob Wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_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 outcomes were there in the elections in California 38?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"table1_1341663_6\" WHERE \"district\"='California 38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_6\" (\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 Charles H. Wilson the incumbent of?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"table1_1341663_6\" WHERE \"incumbent\"='Charles H. Wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341663_6\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party was the winning one in the elections in the California 30 district?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"table1_1341663_6\" WHERE \"district\"='California 30';" } ]
[ { "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 did an election feature the result robert l. leggett (d) 50.2% albert dehr (r) 49.8%?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Robert L. Leggett (D) 50.2% Albert Dehr (R) 49.8%';" } ]