text stringlengths 380 1.33k |
|---|
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
In how many districts is the incumbent Dave E. Satterfield, Jr.
### Context:
CREATE TABLE table_1342292_45 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(result) FROM table_1342292_45 WHERE incumbent = "Dave E. Satterfield, Jr." </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the election result for the candidate first elected in 1918?
### Context:
CREATE TABLE table_1342292_45 (result VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342292_45 WHERE first_elected = 1918 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many parties does william b. cravens represent?
### Context:
CREATE TABLE table_1342292_4 (party VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(party) FROM table_1342292_4 WHERE incumbent = "William B. Cravens" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What district had someone first elected in 1932?
### Context:
CREATE TABLE table_1342292_4 (district VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342292_4 WHERE first_elected = 1932 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What candidates ran in the election when the incumbent was william j. driver?
### Context:
CREATE TABLE table_1342292_4 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342292_4 WHERE incumbent = "William J. Driver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who are all the candidates when Sam Rayburn was incumbent?
### Context:
CREATE TABLE table_1342292_42 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342292_42 WHERE incumbent = "Sam Rayburn" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the party that was frist elected in 1919?
### Context:
CREATE TABLE table_1342292_42 (party VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342292_42 WHERE first_elected = 1919 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
When was incumbent Leo E. Allen first elected?
### Context:
CREATE TABLE table_1342315_12 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MIN(first_elected) FROM table_1342315_12 WHERE incumbent = "Leo E. Allen" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Which district has a Republican elected?
### Context:
CREATE TABLE table_1342315_12 (district VARCHAR, party VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342315_12 WHERE party = "Republican" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many districts does riley joseph wilson?
### Context:
CREATE TABLE table_1342315_17 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342315_17 WHERE incumbent = "Riley Joseph Wilson" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many districts for rené l. derouen?
### Context:
CREATE TABLE table_1342315_17 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342315_17 WHERE incumbent = "René L. DeRouen" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who are the candidates in the race where Wright Patman is the incumbent?
### Context:
CREATE TABLE table_1342315_42 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342315_42 WHERE incumbent = "Wright Patman" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What candidates ran in the election when john s. wood was the incumbent?
### Context:
CREATE TABLE table_1342331_11 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342331_11 WHERE incumbent = "John S. Wood" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result of the election held in 1914?
### Context:
CREATE TABLE table_1342331_11 (result VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342331_11 WHERE first_elected = 1914 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many first elections have Claude Fuller as incumbent?
### Context:
CREATE TABLE table_1342315_4 (first_elected VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(first_elected) FROM table_1342315_4 WHERE incumbent = "Claude Fuller" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many winners were there in the Georgia 1 district?
### Context:
CREATE TABLE table_1342315_10 (first_elected VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT COUNT(first_elected) FROM table_1342315_10 WHERE district = "Georgia 1" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who ran for office at the Georgia 4 district in this election?
### Context:
CREATE TABLE table_1342315_10 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342315_10 WHERE district = "Georgia 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What district has Riley Joseph Wilson as the incumbent?
### Context:
CREATE TABLE table_1342331_18 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342331_18 WHERE incumbent = "Riley Joseph Wilson" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What candidate is in Louisiana 6?
### Context:
CREATE TABLE table_1342331_18 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342331_18 WHERE district = "Louisiana 6" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what happened during the election for Richard M. Kleberg?
### Context:
CREATE TABLE table_1342331_43 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342331_43 WHERE incumbent = "Richard M. Kleberg" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What year was the first election when Fritz G. Lanham was elected?
### Context:
CREATE TABLE table_1342331_43 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MAX(first_elected) FROM table_1342331_43 WHERE incumbent = "Fritz G. Lanham" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What is the name of the candidate where the incumbent is named James P. Buchanan?
### Context:
CREATE TABLE table_1342331_43 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342331_43 WHERE incumbent = "James P. Buchanan" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What party is incumbent Oliver H. Cross?
### Context:
CREATE TABLE table_1342331_43 (party VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342331_43 WHERE incumbent = "Oliver H. Cross" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the district with incumbent being william j. driver
### Context:
CREATE TABLE table_1342331_5 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342331_5 WHERE incumbent = "William J. Driver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the district with incumbent being john e. miller
### Context:
CREATE TABLE table_1342331_5 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342331_5 WHERE incumbent = "John E. Miller" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
how many incumbent with first elected being 1932
### Context:
CREATE TABLE table_1342331_5 (incumbent VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT COUNT(incumbent) FROM table_1342331_5 WHERE first_elected = 1932 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the the incumbent with dbeingtrict being arkansas 1
### Context:
CREATE TABLE table_1342331_5 (incumbent VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342331_5 WHERE district = "Arkansas 1" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
how many district with incumbent being david delano glover
### Context:
CREATE TABLE table_1342331_5 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342331_5 WHERE incumbent = "David Delano Glover" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the the incumbent with candidates being ben cravens (d) unopposed
### Context:
CREATE TABLE table_1342331_5 (incumbent VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342331_5 WHERE candidates = "Ben Cravens (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result in the election in which the incumbent was Denver S. Church?
### Context:
CREATE TABLE table_1342331_6 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342331_6 WHERE incumbent = "Denver S. Church" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result in the election in which Ralph R. Eltse was the incumbent?
### Context:
CREATE TABLE table_1342331_6 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342331_6 WHERE incumbent = "Ralph R. Eltse" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who was the candidate in the election in the California 8 district where the incumbent was first elected in 1932?
### Context:
CREATE TABLE table_1342331_6 (candidates VARCHAR, first_elected VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342331_6 WHERE first_elected = 1932 AND district = "California 8" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what are all the party with district being kansas 1
### Context:
CREATE TABLE table_1342359_15 (party VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342359_15 WHERE district = "Kansas 1" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the result with district being kansas 1
### Context:
CREATE TABLE table_1342359_15 (result VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342359_15 WHERE district = "Kansas 1" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who are the candidates with district being kansas 4
### Context:
CREATE TABLE table_1342359_15 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342359_15 WHERE district = "Kansas 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the result with first elected being 1922
### Context:
CREATE TABLE table_1342359_15 (result VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342359_15 WHERE first_elected = 1922 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the the candidates with dbeingtrict being kansas 5
### Context:
CREATE TABLE table_1342359_15 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342359_15 WHERE district = "Kansas 5" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
how many first elected with district is kansas 3
### Context:
CREATE TABLE table_1342359_15 (first_elected VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT COUNT(first_elected) FROM table_1342359_15 WHERE district = "Kansas 3" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result of the election in the Arkansas 2 district?
### Context:
CREATE TABLE table_1342359_4 (result VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342359_4 WHERE district = "Arkansas 2" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result of the election in the Arkansas 4 district?
### Context:
CREATE TABLE table_1342359_4 (result VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342359_4 WHERE district = "Arkansas 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many candidates ran in the election in the Arkansas 4 district?
### Context:
CREATE TABLE table_1342359_4 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT COUNT(candidates) FROM table_1342359_4 WHERE district = "Arkansas 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many districts does william b. oliver represent?
### Context:
CREATE TABLE table_1342359_2 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342359_2 WHERE incumbent = "William B. Oliver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What is the last year that someone is first elected?
### Context:
CREATE TABLE table_1342359_2 (first_elected INTEGER) [/INST]
### Response:
SELECT MAX(first_elected) FROM table_1342359_2 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many people were elected in 1929
### Context:
CREATE TABLE table_1342359_17 (candidates VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT COUNT(candidates) FROM table_1342359_17 WHERE first_elected = 1929 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
how many people won in 1914
### Context:
CREATE TABLE table_1342359_17 (district VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342359_17 WHERE first_elected = 1914 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who won in 1927
### Context:
CREATE TABLE table_1342359_17 (incumbent VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342359_17 WHERE first_elected = 1927 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Name the number of incumbents for texas 12
### Context:
CREATE TABLE table_1342359_42 (incumbent VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT COUNT(incumbent) FROM table_1342359_42 WHERE district = "Texas 12" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many parties were represented for Charles R. Crisp?
### Context:
CREATE TABLE table_1342370_10 (party VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(party) FROM table_1342370_10 WHERE incumbent = "Charles R. Crisp" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
In what district was the representative first elected in 1916?
### Context:
CREATE TABLE table_1342370_10 (district VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342370_10 WHERE first_elected = 1916 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who were the candidates in the 1922 entry?
### Context:
CREATE TABLE table_1342370_12 (candidates VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342370_12 WHERE first_elected = 1922 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
In which district is James O'Connor the incumbent?
### Context:
CREATE TABLE table_1342370_17 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342370_17 WHERE incumbent = "James O'Connor" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
To which party does Riley Joseph Wilson belong?
### Context:
CREATE TABLE table_1342370_17 (party VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342370_17 WHERE incumbent = "Riley Joseph Wilson" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many of the first elected were listed when Hatton W. Sumners was incumbent and re-elected?
### Context:
CREATE TABLE table_1342370_42 (first_elected VARCHAR, result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(first_elected) FROM table_1342370_42 WHERE result = "Re-elected" AND incumbent = "Hatton W. Sumners" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result in the election where the incumbent was Finis J. Garrett?
### Context:
CREATE TABLE table_1342370_41 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342370_41 WHERE incumbent = "Finis J. Garrett" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
In what district was the incumbent Cordell hull?
### Context:
CREATE TABLE table_1342370_41 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342370_41 WHERE incumbent = "Cordell Hull" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who were the candidates in the election in the Tennessee 9 district?
### Context:
CREATE TABLE table_1342370_41 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342370_41 WHERE district = "Tennessee 9" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result of the election featuring james a. gallivan (d) unopposed?
### Context:
CREATE TABLE table_1342379_20 (result VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342379_20 WHERE candidates = "James A. Gallivan (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many districts does john j. douglass represent?
### Context:
CREATE TABLE table_1342379_20 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342379_20 WHERE incumbent = "John J. Douglass" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
how many areas were in the election in 1912
### Context:
CREATE TABLE table_1342379_10 (district VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1342379_10 WHERE first_elected = 1912 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what is the affiliation of charles h. brand
### Context:
CREATE TABLE table_1342379_10 (party VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342379_10 WHERE incumbent = "Charles H. Brand" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What candidates ran in the election that featured harry lane englebright?
### Context:
CREATE TABLE table_1342370_5 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342370_5 WHERE incumbent = "Harry Lane Englebright" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
When was incumbent William B. Oliver first elected?
### Context:
CREATE TABLE table_1342379_2 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MAX(first_elected) FROM table_1342379_2 WHERE incumbent = "William B. Oliver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the the incumbent with candidates being percy e. quin (d) unopposed
### Context:
CREATE TABLE table_1342379_23 (incumbent VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342379_23 WHERE candidates = "Percy E. Quin (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the district with candidates being john e. rankin (d) unopposed
### Context:
CREATE TABLE table_1342379_23 (district VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342379_23 WHERE candidates = "John E. Rankin (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the the candidates with district being mississippi 4
### Context:
CREATE TABLE table_1342379_23 (candidates VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342379_23 WHERE district = "Mississippi 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who is the incumbent for district mississippi 4
### Context:
CREATE TABLE table_1342379_23 (incumbent VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342379_23 WHERE district = "Mississippi 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the result with incumbent being bill g. lowrey
### Context:
CREATE TABLE table_1342379_23 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342379_23 WHERE incumbent = "Bill G. Lowrey" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what's the district with candidates being william madison whittington (d) unopposed
### Context:
CREATE TABLE table_1342379_23 (district VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342379_23 WHERE candidates = "William Madison Whittington (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the last year that incumbent joseph t. deal was first elected?
### Context:
CREATE TABLE table_1342379_45 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MAX(first_elected) FROM table_1342379_45 WHERE incumbent = "Joseph T. Deal" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What year was someone first elected?
### Context:
CREATE TABLE table_1342379_45 (first_elected INTEGER) [/INST]
### Response:
SELECT MIN(first_elected) FROM table_1342379_45 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What district does edward everett eslick represent?
### Context:
CREATE TABLE table_1342379_41 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342379_41 WHERE incumbent = "Edward Everett Eslick" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many times was incumbent cordell hull first elected?
### Context:
CREATE TABLE table_1342379_41 (first_elected VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(first_elected) FROM table_1342379_41 WHERE incumbent = "Cordell Hull" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many times was the election joseph w. byrns, sr. (d) unopposed?
### Context:
CREATE TABLE table_1342379_41 (result VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT COUNT(result) FROM table_1342379_41 WHERE candidates = "Joseph W. Byrns, Sr. (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What is the least first elected for jeff busby?
### Context:
CREATE TABLE table_1342393_23 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MIN(first_elected) FROM table_1342393_23 WHERE incumbent = "Jeff Busby" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the party for first elected 1923?
### Context:
CREATE TABLE table_1342393_23 (party VARCHAR, first_elected VARCHAR) [/INST]
### Response:
SELECT party FROM table_1342393_23 WHERE first_elected = 1923 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Name the total number of result for mississippi 4?
### Context:
CREATE TABLE table_1342393_23 (result VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT COUNT(result) FROM table_1342393_23 WHERE district = "Mississippi 4" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what is the section where gordon lee ran
### Context:
CREATE TABLE table_1342393_10 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342393_10 WHERE incumbent = "Gordon Lee" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
what section did frank park run in
### Context:
CREATE TABLE table_1342393_10 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342393_10 WHERE incumbent = "Frank Park" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
who won in the race in the section georgia 5
### Context:
CREATE TABLE table_1342393_10 (incumbent VARCHAR, district VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342393_10 WHERE district = "Georgia 5" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many candidates won the election of john n. sandlin?
### Context:
CREATE TABLE table_1342426_18 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(candidates) FROM table_1342426_18 WHERE incumbent = "John N. Sandlin" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who was the incumbent in the election of henry garland dupré (d) unopposed?
### Context:
CREATE TABLE table_1342426_18 (incumbent VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1342426_18 WHERE candidates = "Henry Garland Dupré (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the result when incumbent John R. Tyson was elected?
### Context:
CREATE TABLE table_1342426_3 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342426_3 WHERE incumbent = "John R. Tyson" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Name the result for william j. driver
### Context:
CREATE TABLE table_1342426_5 (result VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT result FROM table_1342426_5 WHERE incumbent = "William J. Driver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Name the district for william j. driver
### Context:
CREATE TABLE table_1342426_5 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342426_5 WHERE incumbent = "William J. Driver" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Name the lowest first elected for chester w. taylor
### Context:
CREATE TABLE table_1342426_5 (first_elected INTEGER, incumbent VARCHAR) [/INST]
### Response:
SELECT MIN(first_elected) FROM table_1342426_5 WHERE incumbent = "Chester W. Taylor" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who were the candidates when Henry Garland Dupré was incumbent?
### Context:
CREATE TABLE table_1342451_16 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT candidates FROM table_1342451_16 WHERE incumbent = "Henry Garland Dupré" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many candidates were there when Henry Garland Dupré was the incumbent?
### Context:
CREATE TABLE table_1342451_16 (candidates VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(candidates) FROM table_1342451_16 WHERE incumbent = "Henry Garland Dupré" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What district did James O'Connor belong to?
### Context:
CREATE TABLE table_1342451_16 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT district FROM table_1342451_16 WHERE incumbent = "James O'Connor" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many different original air dates did the episode number 6 have?
### Context:
CREATE TABLE table_13426649_1 (original_air_date VARCHAR, _number VARCHAR) [/INST]
### Response:
SELECT COUNT(original_air_date) FROM table_13426649_1 WHERE _number = 6 </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who wrote the episode with production code 1ANJ01?
### Context:
CREATE TABLE table_13426649_1 (written_by VARCHAR, production_code VARCHAR) [/INST]
### Response:
SELECT written_by FROM table_13426649_1 WHERE production_code = "1ANJ01" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What are the locations with a panthers mascot?
### Context:
CREATE TABLE table_13456202_1 (location VARCHAR, mascot VARCHAR) [/INST]
### Response:
SELECT location FROM table_13456202_1 WHERE mascot = "Panthers" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What are the locations with an eagles macot?
### Context:
CREATE TABLE table_13456202_1 (location VARCHAR, mascot VARCHAR) [/INST]
### Response:
SELECT location FROM table_13456202_1 WHERE mascot = "Eagles" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many teams have an eagles mascot?
### Context:
CREATE TABLE table_13456202_1 (affiliation VARCHAR, mascot VARCHAR) [/INST]
### Response:
SELECT COUNT(affiliation) FROM table_13456202_1 WHERE mascot = "Eagles" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
How many teams have the titans as a mascot?
### Context:
CREATE TABLE table_13456202_1 (affiliation VARCHAR, mascot VARCHAR) [/INST]
### Response:
SELECT COUNT(affiliation) FROM table_13456202_1 WHERE mascot = "Titans" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
WHat year was north college hill high school founded?
### Context:
CREATE TABLE table_13456202_1 (founded INTEGER, school VARCHAR) [/INST]
### Response:
SELECT MAX(founded) FROM table_13456202_1 WHERE school = "North College Hill High school" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Who was the incumbent when ran william b. oliver (d) unopposed?
### Context:
CREATE TABLE table_1346118_2 (incumbent VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT incumbent FROM table_1346118_2 WHERE candidates = "William B. Oliver (D) Unopposed" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Which party was the incumbent from when the cadidates were henry e. barbour (r) 52.1% henry hawson (d) 47.9%? Answer: Democratic
### Context:
CREATE TABLE table_1346118_5 (party VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT COUNT(party) FROM table_1346118_5 WHERE candidates = "Henry E. Barbour (R) 52.1% Henry Hawson (D) 47.9%" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Which district was the race between john i. nolan (r) 87% thomas f. feeley (s) 13%?
### Context:
CREATE TABLE table_1346118_5 (district VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT district FROM table_1346118_5 WHERE candidates = "John I. Nolan (R) 87% Thomas F. Feeley (S) 13%" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
What was the net seat gain in the race john a. elston (r) 88.4% luella twining (s) 11.6%?
### Context:
CREATE TABLE table_1346118_5 (result VARCHAR, candidates VARCHAR) [/INST]
### Response:
SELECT result FROM table_1346118_5 WHERE candidates = "John A. Elston (R) 88.4% Luella Twining (S) 11.6%" </s> |
<s> [INST] <<SYS>> You are a powerful text-to-SQL model. Your job is to answer questions about a database. You are given a question and context regarding one or more tables. You must output the SQL query that answers the question. <</SYS>>
### Input:
Which District was the incumbent Julius Kahn from? Answer: California 4th district
### Context:
CREATE TABLE table_1346118_5 (district VARCHAR, incumbent VARCHAR) [/INST]
### Response:
SELECT COUNT(district) FROM table_1346118_5 WHERE incumbent = "Julius Kahn" </s> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.