chat_prompt
stringlengths 438
1.53k
|
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0incumbent\u00a0being john sparkman"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John Sparkman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0dbeingtrict\u00a0with\u00a0candidates\u00a0being william b. bankhead (d) 71.3% e. m. reed (r) 28.7%"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='William B. Bankhead (D) 71.3% E. M. Reed (R) 28.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0party\u00a0with\u00a0incumbent\u00a0being william b. bankhead"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William B. Bankhead';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district \u00a0with\u00a0first elected\u00a0being 1938"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1938;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many incumbents were first elected in 1930?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1930;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In how many districts is the incumbent Dave E. Satterfield, Jr."
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Dave E. Satterfield, Jr.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the election result for the candidate first elected in 1918?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1918;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties does william b. cravens represent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William B. Cravens';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district had someone first elected in 1932?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1932;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidates ran in the election when the incumbent was william j. driver?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William J. Driver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 when Sam Rayburn was incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Sam Rayburn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the party that was frist elected in 1919?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1919;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1342315_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When was incumbent Leo E. Allen first elected?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"table1_1342315_12\" WHERE \"incumbent\"='Leo E. Allen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1342315_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Which district has a Republican elected?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"table1_1342315_12\" WHERE \"party\"='Republican';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts does riley joseph wilson?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Riley Joseph Wilson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts for ren\u00e9 l. derouen?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ren\u00e9 L. DeRouen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates in the race where Wright Patman is the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Wright Patman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidates ran in the election when john s. wood was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John S. Wood';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election held in 1914?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1914;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many first elections have Claude Fuller as incumbent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Claude Fuller';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many winners were there in the Georgia 1 district?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Georgia 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who ran for office at the Georgia 4 district in this election?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Georgia 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district has Riley Joseph Wilson as the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Riley Joseph Wilson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidate is in Louisiana 6?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Louisiana 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what happened during the election for Richard M. Kleberg?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Richard M. Kleberg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was the first election when Fritz G. Lanham was elected?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Fritz G. Lanham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 name of the candidate where the incumbent is named James P. Buchanan?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='James P. Buchanan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party is incumbent Oliver H. Cross?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Oliver H. Cross';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district with\u00a0incumbent\u00a0being william j. driver"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William J. Driver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district with\u00a0incumbent\u00a0being john e. miller"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John E. Miller';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0incumbent\u00a0with\u00a0first elected\u00a0being 1932"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1932;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0incumbent\u00a0with\u00a0dbeingtrict\u00a0being arkansas 1"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Arkansas 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0district \u00a0with\u00a0incumbent\u00a0being david delano glover"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='David Delano Glover';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being ben cravens (d) unopposed"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Ben Cravens (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the election in which the incumbent was Denver S. Church? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Denver S. Church';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the election in which Ralph R. Eltse was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Ralph R. Eltse';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the candidate in the election in the California 8 district where the incumbent was first elected in 1932? "
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1932 AND \"district\"='California 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\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what are all the\u00a0party\u00a0with\u00a0district being kansas 1"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kansas 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0district being kansas 1"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kansas 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who are the\u00a0candidates\u00a0with\u00a0district being kansas 4"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kansas 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0first elected\u00a0being 1922"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1922;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0candidates\u00a0with\u00a0dbeingtrict\u00a0being kansas 5"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kansas 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many\u00a0first elected\u00a0with\u00a0district\u00a0is kansas 3"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Kansas 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election in the Arkansas 2 district? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Arkansas 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election in the Arkansas 4 district? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Arkansas 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates ran in the election in the Arkansas 4 district? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Arkansas 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts does william b. oliver represent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William B. Oliver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 last year that someone is first elected?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many people were elected in 1929"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1929;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many people won in 1914"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1914;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who won in 1927"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1927;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of incumbents for texas 12 "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incumbent\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Texas 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many parties were represented for Charles R. Crisp?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"party\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Charles R. Crisp';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In what district was the representative first elected in 1916?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1916;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the 1922 entry?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1922;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In which district is James O'Connor the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='James O''Connor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: To which party does Riley Joseph Wilson belong?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Riley Joseph Wilson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many of the first elected were listed when Hatton W. Sumners was incumbent and re-elected?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"result\"='Re-elected' AND \"incumbent\"='Hatton W. Sumners';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result in the election where the incumbent was Finis J. Garrett? "
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Finis J. Garrett';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In what district was the incumbent Cordell hull? "
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Cordell Hull';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates in the election in the Tennessee 9 district? "
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Tennessee 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result of the election featuring james a. gallivan (d) unopposed?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='James A. Gallivan (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many districts does john j. douglass represent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John J. Douglass';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: how many areas were in the election in 1912"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1912;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 affiliation of charles h. brand"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Charles H. Brand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What candidates ran in the election that featured harry lane englebright?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Harry Lane Englebright';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When was incumbent William B. Oliver first elected?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William B. Oliver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0incumbent\u00a0with\u00a0candidates\u00a0being percy e. quin (d) unopposed"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Percy E. Quin (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district with\u00a0candidates\u00a0being john e. rankin (d) unopposed"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='John E. Rankin (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the the\u00a0candidates\u00a0with\u00a0district being mississippi 4"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Mississippi 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: who is the incumbent for district mississippi 4"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Mississippi 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0result\u00a0with\u00a0incumbent\u00a0being bill g. lowrey"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Bill G. Lowrey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what's the\u00a0district \u00a0with\u00a0candidates\u00a0being william madison whittington (d) unopposed"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='William Madison Whittington (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the last year that incumbent joseph t. deal was first elected?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Joseph T. Deal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What year was someone first elected?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district does edward everett eslick represent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Edward Everett Eslick';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was incumbent cordell hull first elected?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Cordell Hull';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many times was the election joseph w. byrns, sr. (d) unopposed?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Joseph W. Byrns, Sr. (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What is the least first elected for jeff busby?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Jeff Busby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the party for first elected 1923?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1923;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the total number of result for mississippi 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Mississippi 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: what is the section where gordon lee ran"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Gordon Lee';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 section did frank park run in"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Frank Park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 won in the race in the section georgia 5"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='Georgia 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates won the election of john n. sandlin?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John N. Sandlin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who was the incumbent in the election of henry garland dupr\u00e9 (d) unopposed?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"united_states_house_of_representatives_e\" WHERE \"candidates\"='Henry Garland Dupr\u00e9 (D) Unopposed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What was the result when incumbent John R. Tyson was elected?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='John R. Tyson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for william j. driver"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William J. Driver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 district for william j. driver "
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='William J. Driver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "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 lowest first elected for chester w. taylor"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Chester W. Taylor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were the candidates when Henry Garland Dupr\u00e9 was incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"candidates\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Henry Garland Dupr\u00e9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many candidates were there when Henry Garland Dupr\u00e9 was the incumbent? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"candidates\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='Henry Garland Dupr\u00e9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district did James O'Connor belong to?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='James O''Connor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13426649_1\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: When did the episode titled \"Winterland\" air for the first time? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_13426649_1\" WHERE \"title\"='\\\"Winterland\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13426649_1\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many different original air dates did the episode number 6 have? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"original_air_date\") FROM \"table1_13426649_1\" WHERE \"num\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13426649_1\" (\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episode with production code 1ANJ01?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_13426649_1\" WHERE \"production_code\"='1ANJ01';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13456202_1\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"mascot\" text,\n \"division\" text\n);\n\nQuestion: What are the locations with a panthers mascot?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"table1_13456202_1\" WHERE \"mascot\"='Panthers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13456202_1\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"mascot\" text,\n \"division\" text\n);\n\nQuestion: What are the locations with an eagles macot?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"table1_13456202_1\" WHERE \"mascot\"='Eagles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13456202_1\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"mascot\" text,\n \"division\" text\n);\n\nQuestion: How many teams have an eagles mascot?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"affiliation\") FROM \"table1_13456202_1\" WHERE \"mascot\"='Eagles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_13456202_1\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"mascot\" text,\n \"division\" text\n);\n\nQuestion: How many teams have the titans as a mascot?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"affiliation\") FROM \"table1_13456202_1\" WHERE \"mascot\"='Titans';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.