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 \"texas\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the first elected for texas 6 district" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"texas\" WHERE \"district\"='Texas 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for texas 22 district" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"texas\" 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 \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How did the election in the Florida 14 district end?" }, { "role": "assistant", "content": "SELECT \"results\" FROM \"florida\" WHERE \"district\"='Florida 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who's the incumbent of Florida 12 district?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"florida\" WHERE \"district\"='Florida 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who is the incumbent of Florida 9?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"florida\" WHERE \"district\"='Florida 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who's the incumbent in Florida 6?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"florida\" WHERE \"district\"='Florida 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party does Bill McCollum belong to?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"florida\" WHERE \"incumbent\"='Bill McCollum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What are the results in the county with Peter Deutsch as a candidate?" }, { "role": "assistant", "content": "SELECT \"results\" FROM \"florida\" WHERE \"incumbent\"='Peter Deutsch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How did the election end for Robert Wexler?" }, { "role": "assistant", "content": "SELECT \"results\" FROM \"florida\" WHERE \"incumbent\"='Robert Wexler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party was the winner in the district Maryland 6?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"maryland\" WHERE \"district\"='Maryland 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who run for office in district Maryland 3?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"maryland\" WHERE \"district\"='Maryland 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: List the candidates in district Maryland 1 where the republican party won." }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"maryland\" WHERE \"party\"='Republican' AND \"district\"='Maryland 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"maryland\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: When did the elections take place in district Maryland 2?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"maryland\" WHERE \"district\"='Maryland 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_jersey\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party is Frank Lobiondo a member of?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"new_jersey\" WHERE \"incumbent\"='Frank LoBiondo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_jersey\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the district whose incumbent is Bill Pascrell?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"new_jersey\" WHERE \"incumbent\"='Bill Pascrell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_jersey\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What is the party of the district incumbent Jim Saxton?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"new_jersey\" WHERE \"incumbent\"='Jim Saxton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party is John McHugh a member of?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"new_york\" WHERE \"incumbent\"='John McHugh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What's the party elected in the district that first elected in 1990?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"new_york\" WHERE \"first_elected\"='1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What's the first elected year of the district that Ed Towns is an incumbent of?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"new_york\" WHERE \"incumbent\"='Ed Towns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many elections have resulted in retired democratic hold?" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"new_york\" WHERE \"results\"='Retired Democratic hold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What were the candidates in the district that first elected in 1980?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"new_york\" 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 \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: When was Chaka Fattah first elected in the Pennsylvania 2 district? " }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many incumbents were first elected in 1984? " }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"pennsylvania\" WHERE \"first_elected\"='1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: When was incumbent Bud Shuster first elected? " }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"pennsylvania\" 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 \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates ran in the election where Mike Doyle was the incumbent? " }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"pennsylvania\" WHERE \"incumbent\"='Mike Doyle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Incumbent Tim Holden belonged to what party? " }, { "role": "assistant", "content": "SELECT \"party\" FROM \"pennsylvania\" WHERE \"incumbent\"='Tim Holden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: In what district was Tim Holden the incumbent? " }, { "role": "assistant", "content": "SELECT \"district\" FROM \"pennsylvania\" WHERE \"incumbent\"='Tim Holden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Which incumbent was first elected in 1984?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"tennessee\" WHERE \"first_elected\"=1984;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: When was the incumbent in the Tennessee 4 district first elected? " }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"tennessee\" WHERE \"district\"='Tennessee 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates in the Tennessee 3 district election? " }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"tennessee\" WHERE \"district\"='Tennessee 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What year was Bob Clement first elected? " }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"tennessee\" 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 \"florida\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: List all the candidates for the seat where the incumbent is Sam Gibbons?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"florida\" WHERE \"incumbent\"='Sam Gibbons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in district Wisconsin 4?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"wisconsin\" WHERE \"district\"='Wisconsin 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who's the incumbent in the district that first elected in 1969?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"wisconsin\" WHERE \"first_elected\"=1969;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wisconsin\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: Who's the incumbent of district Wisconsin 5?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"wisconsin\" WHERE \"district\"='Wisconsin 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts does gary condit represent?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"california\" WHERE \"incumbent\"='Gary Condit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What party was first elected in 1974?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"california\" 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 \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What district is bill thomas from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"california\" WHERE \"incumbent\"='Bill Thomas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text,\n \"candidates\" text\n);\n\nQuestion: What district is bill thomas from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"california\" WHERE \"incumbent\"='Bill Thomas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\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 of district Georgia 2?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"georgia\" WHERE \"district\"='Georgia 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\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 Mac Collins an incumbent in?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"georgia\" WHERE \"incumbent\"='Mac Collins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\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 first elected year of the district who's been the last one to do so?" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"georgia\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\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 district where Charlie Norwood is the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"georgia\" WHERE \"incumbent\"='Charlie Norwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which result did the Republican have with the incumbent, Billy Tauzin?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"louisiana\" WHERE \"party\"='Republican' AND \"incumbent\"='Billy Tauzin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisiana\" (\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 was Robert Livingston incumbent in?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"louisiana\" WHERE \"incumbent\"='Robert Livingston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisiana\" (\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 election year listed?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"louisiana\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: List all results in elections with Richard Baker as the incumbent." }, { "role": "assistant", "content": "SELECT \"result\" FROM \"louisiana\" WHERE \"incumbent\"='Richard Baker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington\" (\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\u00a0district being washington 7" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"washington\" WHERE \"district\"='Washington 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington\" (\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 latest first elected year" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"washington\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington\" (\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 washington 7" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"washington\" WHERE \"district\"='Washington 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what being the minimum\u00a0first elected\u00a0with\u00a0district being washington 7" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"washington\" WHERE \"district\"='Washington 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0for first elected\u00a0in 1948 , 1964" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"illinois\" WHERE \"first_elected\"='1948 , 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0first elected\u00a0with\u00a0district illinois 18" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"illinois\" WHERE \"district\"='Illinois 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0candidates\u00a0 jerry weller (r) 51.77% clem balanoff (d) 48.23%" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"illinois\" WHERE \"candidates\"='Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0for the first elected\u00a0in 1980" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"illinois\" 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 \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0district illinois 15" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"illinois\" WHERE \"district\"='Illinois 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"illinois\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0total number of candidates for first elected\u00a0in 1948 , 1964" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"illinois\" WHERE \"first_elected\"='1948 , 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name thedistrict for 1994" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"new_york\" WHERE \"first_elected\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\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 New York 11" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"new_york\" WHERE \"district\"='New York 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\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 first elected for new york 11" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"new_york\" WHERE \"district\"='New York 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the first elected for new york 1" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"new_york\" WHERE \"district\"='New York 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\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 Larry combest elected" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"texas\" WHERE \"incumbent\"='Larry Combest';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: To what district does Bill Hefner belong?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"north_carolina\" WHERE \"incumbent\"='Bill Hefner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who ran unsuccessfully against Bill Hefner?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"north_carolina\" WHERE \"incumbent\"='Bill Hefner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: How many districts are respresented by Alex McMillan?" }, { "role": "assistant", "content": "SELECT COUNT(\"status\") FROM \"north_carolina\" WHERE \"incumbent\"='Alex McMillan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What party is Sanford Bishop a member of?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"georgia\" WHERE \"incumbent\"='Sanford Bishop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What party won in the district Georgia7?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"georgia\" WHERE \"district\"='Georgia7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgia\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What's Georgia5's first elected year?" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"georgia\" WHERE \"district\"='Georgia5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who opposed Marty Meehan in each election?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"massachusetts\" WHERE \"incumbent\"='Marty Meehan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who are the opponents in Massachusetts5 district?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"massachusetts\" WHERE \"district\"='Massachusetts5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What parties are represented in Massachusetts4 district?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"massachusetts\" WHERE \"district\"='Massachusetts4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who is the incumbent in district Massachusetts7?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"massachusetts\" WHERE \"district\"='Massachusetts7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341549_33\" (\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\u00a0district being new york2" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"table1_1341549_33\" WHERE \"district\"='New York2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341549_33\" (\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\u00a0candidates\u00a0being eliot l. engel (d) 85.2% martin richman (r) 14.8%" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"table1_1341549_33\" WHERE \"candidates\"='Eliot L. Engel (D) 85.2% Martin Richman (R) 14.8%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341549_33\" (\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\u00a0party\u00a0being democratic and\u00a0dbeingtrict\u00a0being new york5" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"table1_1341549_33\" WHERE \"party\"='Democratic' AND \"district\"='New York5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1341549_33\" (\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\u00a0result\u00a0being re-elected and\u00a0incumbent\u00a0being gary ackerman redistricted from the 7th district" }, { "role": "assistant", "content": "SELECT COUNT(\"first_elected\") FROM \"table1_1341549_33\" WHERE \"result\"='Re-elected' AND \"incumbent\"='Gary Ackerman Redistricted from the 7th district';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What party does ron klink represent?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"pennsylvania\" WHERE \"incumbent\"='Ron Klink';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who was in the election that was for incumbent bud shuster's seat?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"pennsylvania\" 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 \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What district had someone first elected in 1982?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"pennsylvania\" 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 \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: How many republican incumbents first elected in 1974?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"pennsylvania\" WHERE \"party\"='Republican' AND \"first_elected\"=1974;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What was the result of the election where william f. goodling was the incumbent?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"pennsylvania\" WHERE \"incumbent\"='William F. Goodling';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What party did incumbent Howard Coble belong to?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"north_carolina\" WHERE \"incumbent\"='Howard Coble';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What party did incumbent Stephen L. Neal belong to? " }, { "role": "assistant", "content": "SELECT \"party\" FROM \"north_carolina\" WHERE \"incumbent\"='Stephen L. Neal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: In how many districts was the democratic incumbent elected in 1974? " }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"north_carolina\" WHERE \"party\"='Democratic' AND \"elected\"=1974;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What year was incumbent Martin Lancaster elected? " }, { "role": "assistant", "content": "SELECT MIN(\"elected\") FROM \"north_carolina\" WHERE \"incumbent\"='Martin Lancaster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What are the locations where the year of election is 1980?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"minnesota\" WHERE \"elected\"=1980;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What location is Vin Weber from?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"minnesota\" WHERE \"incumbent\"='Vin Weber';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What is Larry Combest's district?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"texas\" WHERE \"incumbent\"='Larry Combest';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What is the status of incumbent Charles Stenholm?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"texas\" WHERE \"incumbent\"='Charles Stenholm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" text,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: How many incumbents represent district California 34?" }, { "role": "assistant", "content": "SELECT COUNT(\"incumbent\") FROM \"california\" WHERE \"district\"='California 34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" text,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: What is the elected status of the Democratic party in 1989?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"california\" WHERE \"party\"='Democratic' AND \"elected\"='1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" text,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who are the opponents in district California 9?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"california\" WHERE \"district\"='California 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" text,\n \"status\" text,\n \"opponent\" text\n);\n\nQuestion: Who are the incumbents elected in 1974?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"california\" WHERE \"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: Which incumbent was first elected in 1958?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "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 who ran in the district where Ralph Regula is the incumbent?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ralph Regula';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "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 does Del Latta belong to?" }, { "role": "assistant", "content": "SELECT \"party\" 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: Which party does Tom Luken belong to?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Tom Luken';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "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 all the candidates when incumbent was Tim Valentine?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Tim Valentine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "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 1958" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "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 1952?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1952;" } ]