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 \"table1_26638600_3\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lites_1_race_one_winning_team\" text,\n \"lites_2_race_one_winning_team\" text,\n \"lites_1_race_two_winning_team\" text,\n \"lites_2_race_two_winning_team\" text\n);\n\nQuestion: On which circuit was the lites 1 race one winning team #66 Gunnar Racing?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"table1_26638600_3\" WHERE \"lites_1_race_one_winning_team\"='#66 Gunnar Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26638600_3\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lites_1_race_one_winning_team\" text,\n \"lites_2_race_one_winning_team\" text,\n \"lites_1_race_two_winning_team\" text,\n \"lites_2_race_two_winning_team\" text\n);\n\nQuestion: On which circuit was the lites race two winning team #13 Inspire Motorsports?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"table1_26638600_3\" WHERE \"lites_1_race_two_winning_team\"='#13 Inspire Motorsports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26638600_3\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lites_1_race_one_winning_team\" text,\n \"lites_2_race_one_winning_team\" text,\n \"lites_1_race_two_winning_team\" text,\n \"lites_2_race_two_winning_team\" text\n);\n\nQuestion: Who was the lites 2 race two winning team when #13 Inspire Motorsports was the Lites 1 race one winning team?"
},
{
"role": "assistant",
"content": "SELECT \"lites_2_race_two_winning_team\" FROM \"table1_26638600_3\" WHERE \"lites_1_race_one_winning_team\"='#13 Inspire Motorsports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2667438_5\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: What date did series number 32 premiere? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_2667438_5\" WHERE \"no_in_series\"=32;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26677836_1\" (\n \"place\" real,\n \"nation\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real,\n \"table_points\" real\n);\n\nQuestion: WHat is the highest difference?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"difference\") FROM \"table1_26677836_1\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26677836_1\" (\n \"place\" real,\n \"nation\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real,\n \"table_points\" real\n);\n\nQuestion: What is the nation when the for is 326?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"table1_26677836_1\" WHERE \"for\"=326;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26677836_1\" (\n \"place\" real,\n \"nation\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real,\n \"table_points\" real\n);\n\nQuestion: What is the highest lost?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"table1_26677836_1\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26677836_1\" (\n \"place\" real,\n \"nation\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real,\n \"table_points\" real\n);\n\nQuestion: What is the nation when the place is 2?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"table1_26677836_1\" WHERE \"place\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_26677836_1\" (\n \"place\" real,\n \"nation\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"for\" real,\n \"against\" real,\n \"difference\" real,\n \"table_points\" real\n);\n\nQuestion: How many times is the nation [[|]] (19)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"table1_26677836_1\" WHERE \"nation\"='[[|]] (19)';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which party does the incumbent Mathias Morris belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"pennsylvania\" WHERE \"incumbent\"='Mathias Morris';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which district does the incumbent Luther Reily represent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"pennsylvania\" WHERE \"incumbent\"='Luther Reily';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates for the Pennsylvania 11 district?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 11';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many people won the election in the Pennsylvania 11 district?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668173_4\" (\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 the incumbent was first elected and then lost re-election anti-masonic gain?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"table1_2668173_4\" WHERE \"result\"='Lost re-election Anti-Masonic gain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668173_4\" (\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 if the incumbent was Henry Logan?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668173_4\" WHERE \"incumbent\"='Henry Logan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668173_4\" (\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 district of the incumbent Mathias Morris?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"table1_2668173_4\" WHERE \"incumbent\"='Mathias Morris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668173_4\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many incumbents was first elected in the Anti-Masonic party?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"table1_2668173_4\" WHERE \"party\"='Anti-Masonic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668243_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for robert monell (j) 63.6% tilly lynde 36.4%"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"table1_2668243_17\" WHERE \"candidates\"='Robert Monell (J) 63.6% Tilly Lynde 36.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668243_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of first elected for thomas maxwell (j) 60.1% david woodcock (aj) 39.9%"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"table1_2668243_17\" WHERE \"candidates\"='Thomas Maxwell (J) 60.1% David Woodcock (AJ) 39.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668243_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the candidates for new york 21"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668243_17\" WHERE \"district\"='New York 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668243_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the candidates for selah r. hobbie"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668243_17\" WHERE \"incumbent\"='Selah R. Hobbie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668243_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for james lent (j) 52.3% silas wood (aj) 47.7%"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"table1_2668243_17\" WHERE \"candidates\"='James Lent (J) 52.3% Silas Wood (AJ) 47.7%';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in districk Pennsylvania 12?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 12';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the result for district pennsylvania 6?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"pennsylvania\" 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 \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"pennsylvania\" WHERE \"candidates\"='John Banks (AM) 52.2% Samuel Power (J) 47.8%';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"pennsylvania\" WHERE \"result\"='Re-elected' AND \"party\"='Anti-Masonic' AND \"district\"='Pennsylvania 24';"
}
]
|
[
{
"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 \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"pennsylvania\" WHERE \"result\"='Re-elected' AND \"first_elected\"='1832' AND \"party\"='Jacksonian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" text,\n \"rank_qualifying\" real,\n \"score_qualifying\" text\n);\n\nQuestion: In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank_qualifying\") FROM \"competitive_history\" WHERE \"location\"='Ghent' AND \"year\"=2011 AND \"score_qualifying\"='14.850';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" text,\n \"rank_qualifying\" real,\n \"score_qualifying\" text\n);\n\nQuestion: What was the maximum rank-final score on the floor exercise?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank_final\") FROM \"competitive_history\" WHERE \"apparatus\"='Floor Exercise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" text,\n \"rank_qualifying\" real,\n \"score_qualifying\" text\n);\n\nQuestion: What was the maximum rank-final value for a score of 14.975?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank_final\") FROM \"competitive_history\" WHERE \"score_final\"='14.975';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive_history\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" text,\n \"rank_qualifying\" real,\n \"score_qualifying\" text\n);\n\nQuestion: Where did the event with a final score of 15.050 occur?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"competitive_history\" WHERE \"score_final\"='15.050';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many \"Party\" are in district south carolina 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What \"party\" was re-elected in district South Carolina 7?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Re-elected' AND \"district\"='South Carolina 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who were the \"candidate\" of South Carolina 6?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the \"incumbent\" of district south carolina 7?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='South Carolina 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many people were first elected when john roane was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John Roane';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party did john s. barbour represent?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John S. Barbour';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election featuring andrew stevenson (j) 100%?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Andrew Stevenson (J) 100%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidate(s) ran for election when nathaniel h. claiborne was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Nathaniel H. Claiborne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the ran as an incumbent leader first in 1818?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"='1818';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the running candidates when Joshua Sands was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Joshua Sands';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election where stephen van rensselaer was the incumbent and the party represented was the adams-clay federalist party?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"party\"='Adams-Clay Federalist' AND \"incumbent\"='Stephen Van Rensselaer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many district has a candidate that was first elected on 1811?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"='1811';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In what district was the incumbent Charles A. Wickliffe? "
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Charles A. Wickliffe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party did the incumbent Thomas P. Moore belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Thomas P. Moore';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the Kentucky 9 district? "
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kentucky 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the Kentucky 5 district? "
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kentucky 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent when the candidate was william drayton (j)?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='William Drayton (J)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party did candidate george mcduffie (j) represent?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='George McDuffie (J)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party did robert p. letcher represent?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Robert P. Letcher';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district(s) did henry clay represent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Henry Clay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates for election that had a result of a retired jacksonian gain?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Retired Jacksonian gain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What ended up happening in the district Virginia 22?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party won the Virginia 4 district?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many people won the election in the district of Virginia 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who is the incumbent in the Virginia 6 district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is Samuel Smith's party?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Samuel 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is Peter Little's party?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Peter Little';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of Samuel Smith's race?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Samuel 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for north carolina 9"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='North Carolina 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the party for hutchins g. burton"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Hutchins G. Burton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for thomas h. hall (dr) 53.0% william clarke (f) 47.0%"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Thomas H. Hall (DR) 53.0% William Clarke (F) 47.0%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the candidates for felix walker"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Felix Walker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates when the incumbent is john pegram?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John Pegram';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates for district virginia 12?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Virginia 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the result when the candidates are alexander smyth (dr) 100%"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Alexander Smyth (DR) 100%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times is the candidates charles f. mercer (f) 100%?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Charles F. Mercer (F) 100%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many times was the incumbent is john b. yates?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"table1_2668347_14\" WHERE \"incumbent\"='John B. Yates';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: when was the first elected when the candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"table1_2668347_14\" WHERE \"candidates\"='Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who are the candidates for district new york 10?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668347_14\" WHERE \"district\"='New York 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many times were the candidates thomas h. hubbard (dr) 51.5% simeon ford (f) 48.4%?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"table1_2668347_14\" WHERE \"candidates\"='Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is the district when the party is federalist and first elected is 1814?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"table1_2668347_14\" WHERE \"party\"='Federalist' AND \"first_elected\"='1814';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the candidates for pennsylvania 14"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668347_17\" WHERE \"district\"='Pennsylvania 14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_17\" (\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 jacob spangler (dr) 67.1% jacob hay (f) 32.9%"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"table1_2668347_17\" WHERE \"candidates\"='Jacob Spangler (DR) 67.1% Jacob Hay (F) 32.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the most first elected"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"table1_2668347_17\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668347_17\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of candidates for samuel d. ingham"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"table1_2668347_17\" WHERE \"incumbent\"='Samuel D. Ingham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which district did William A. Burwell (Dr) belong to? "
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='William A. Burwell (DR)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the district represented by Thomas R. Gold?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Thomas R. Gold';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who is every incumbent when Kentucky 2 is the district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kentucky 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who is first elected when Kentucky 6 is the district?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kentucky 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is every district for incumbent Joseph Desha?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Joseph Desha';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which party experienced a result of lost re-election democratic-republican hold?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Lost re-election Democratic-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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts have John C. Calhoun as the incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John C. Calhoun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668367_7\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent in the Kentucky 8 district? "
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"table1_2668367_7\" WHERE \"district\"='Kentucky 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668367_7\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the election in the Kentucky 8 district? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"table1_2668367_7\" WHERE \"district\"='Kentucky 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668367_7\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the election in the Kentucky 1 district? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"table1_2668367_7\" WHERE \"district\"='Kentucky 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district had an election with incumbent john smilie?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John Smilie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts first elected someone in 1808 and had george smith as the incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"='1808' AND \"incumbent\"='George Smith';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668374_18\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent in Virginia 3?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"table1_2668374_18\" 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 \"table1_2668374_18\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What incumbent was a federalist that was first elected in 1803?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"table1_2668374_18\" WHERE \"party\"='Federalist' AND \"first_elected\"='1803';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668374_18\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties were first elected in 1805?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"table1_2668374_18\" WHERE \"first_elected\"='1805';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668374_18\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district was John Dawson from?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"table1_2668374_18\" WHERE \"incumbent\"='John Dawson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668374_10\" (\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 running candidates when Samuel Riker was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668374_10\" WHERE \"incumbent\"='Samuel Riker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668367_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the district where the incumbent was Nathaniel Macon?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"table1_2668367_14\" WHERE \"incumbent\"='Nathaniel Macon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2668367_14\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party did the incumbent Joseph Pearson belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"table1_2668367_14\" WHERE \"incumbent\"='Joseph Pearson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many incumbents are there in Pennsylvania 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 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\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What are the parties listed for Pennsylvania 8?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%."
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result for Andrew Gregg?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Andrew Gregg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result for Pennsylvania 8?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Pennsylvania 8';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.