instruction
stringlengths
67
299
input
stringlengths
88
550
output
stringlengths
32
484
Write a SQL query that answers the following question: Who were the candidates in districk Pennsylvania 12?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668199_2 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668199_2 WHERE district = "Pennsylvania 12"
Write a SQL query that answers the following question: What is the result for district pennsylvania 6?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668199_2 (result VARCHAR, district VARCHAR)
SELECT result FROM table_2668199_2 WHERE district = "Pennsylvania 6"
Write a SQL query that answers the following question: Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668199_2 (incumbent VARCHAR, candidates VARCHAR)
SELECT incumbent FROM table_2668199_2 WHERE candidates = "John Banks (AM) 52.2% Samuel Power (J) 47.8%"
Write a SQL query that answers the following question: How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668199_2 (first_elected VARCHAR, district VARCHAR, result VARCHAR, party VARCHAR)
SELECT COUNT(first_elected) FROM table_2668199_2 WHERE result = "Re-elected" AND party = "Anti-Masonic" AND district = "Pennsylvania 24"
Write a SQL query that answers the following question: Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668199_2 (candidates VARCHAR, party VARCHAR, result VARCHAR, first_elected VARCHAR)
SELECT candidates FROM table_2668199_2 WHERE result = "Re-elected" AND first_elected = "1832" AND party = "Jacksonian"
Write a SQL query that answers the following question: In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850
The relevant table was constructed using the following SQL : CREATE TABLE table_26681728_1 (rank_qualifying INTEGER, score_qualifying VARCHAR, location VARCHAR, year VARCHAR)
SELECT MAX(rank_qualifying) FROM table_26681728_1 WHERE location = "Ghent" AND year = 2011 AND score_qualifying = "14.850"
Write a SQL query that answers the following question: What was the maximum rank-final score on the floor exercise?
The relevant table was constructed using the following SQL : CREATE TABLE table_26681728_1 (rank_final INTEGER, apparatus VARCHAR)
SELECT MAX(rank_final) FROM table_26681728_1 WHERE apparatus = "Floor Exercise"
Write a SQL query that answers the following question: What was the maximum rank-final value for a score of 14.975?
The relevant table was constructed using the following SQL : CREATE TABLE table_26681728_1 (rank_final INTEGER, score_final VARCHAR)
SELECT MAX(rank_final) FROM table_26681728_1 WHERE score_final = "14.975"
Write a SQL query that answers the following question: Where did the event with a final score of 15.050 occur?
The relevant table was constructed using the following SQL : CREATE TABLE table_26681728_1 (location VARCHAR, score_final VARCHAR)
SELECT location FROM table_26681728_1 WHERE score_final = "15.050"
Write a SQL query that answers the following question: how many "Party" are in district south carolina 2?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_22 (party VARCHAR, district VARCHAR)
SELECT COUNT(party) FROM table_2668243_22 WHERE district = "South Carolina 2"
Write a SQL query that answers the following question: What "party" was re-elected in district South Carolina 7?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_22 (party VARCHAR, result VARCHAR, district VARCHAR)
SELECT party FROM table_2668243_22 WHERE result = "Re-elected" AND district = "South Carolina 7"
Write a SQL query that answers the following question: who were the "candidate" of South Carolina 6?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_22 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668243_22 WHERE district = "South Carolina 6"
Write a SQL query that answers the following question: Who was the "incumbent" of district south carolina 7?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_22 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668243_22 WHERE district = "South Carolina 7"
Write a SQL query that answers the following question: How many people were first elected when john roane was the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_25 (first_elected VARCHAR, incumbent VARCHAR)
SELECT COUNT(first_elected) FROM table_2668243_25 WHERE incumbent = "John Roane"
Write a SQL query that answers the following question: What party did john s. barbour represent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_25 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668243_25 WHERE incumbent = "John S. Barbour"
Write a SQL query that answers the following question: What was the result of the election featuring andrew stevenson (j) 100%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_25 (result VARCHAR, candidates VARCHAR)
SELECT result FROM table_2668243_25 WHERE candidates = "Andrew Stevenson (J) 100%"
Write a SQL query that answers the following question: What candidate(s) ran for election when nathaniel h. claiborne was the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668243_25 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668243_25 WHERE incumbent = "Nathaniel H. Claiborne"
Write a SQL query that answers the following question: Who was the ran as an incumbent leader first in 1818?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_17 (incumbent VARCHAR, first_elected VARCHAR)
SELECT incumbent FROM table_2668254_17 WHERE first_elected = "1818"
Write a SQL query that answers the following question: Who were the running candidates when Joshua Sands was the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_17 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668254_17 WHERE incumbent = "Joshua Sands"
Write a SQL query that answers the following question: What was the result of the election where stephen van rensselaer was the incumbent and the party represented was the adams-clay federalist party?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668264_17 (result VARCHAR, party VARCHAR, incumbent VARCHAR)
SELECT result FROM table_2668264_17 WHERE party = "Adams-Clay Federalist" AND incumbent = "Stephen Van Rensselaer"
Write a SQL query that answers the following question: How many district has a candidate that was first elected on 1811?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_25 (district VARCHAR, first_elected VARCHAR)
SELECT COUNT(district) FROM table_2668254_25 WHERE first_elected = "1811"
Write a SQL query that answers the following question: In what district was the incumbent Charles A. Wickliffe?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_8 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668254_8 WHERE incumbent = "Charles A. Wickliffe"
Write a SQL query that answers the following question: What party did the incumbent Thomas P. Moore belong to?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_8 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668254_8 WHERE incumbent = "Thomas P. Moore"
Write a SQL query that answers the following question: Who were the candidates in the Kentucky 9 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_8 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668254_8 WHERE district = "Kentucky 9"
Write a SQL query that answers the following question: Who were the candidates in the Kentucky 5 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_8 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668254_8 WHERE district = "Kentucky 5"
Write a SQL query that answers the following question: Who was the incumbent when the candidate was william drayton (j)?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_22 (incumbent VARCHAR, candidates VARCHAR)
SELECT incumbent FROM table_2668254_22 WHERE candidates = "William Drayton (J)"
Write a SQL query that answers the following question: What party did candidate george mcduffie (j) represent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668254_22 (party VARCHAR, candidates VARCHAR)
SELECT party FROM table_2668254_22 WHERE candidates = "George McDuffie (J)"
Write a SQL query that answers the following question: What party did robert p. letcher represent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668264_8 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668264_8 WHERE incumbent = "Robert P. Letcher"
Write a SQL query that answers the following question: What district(s) did henry clay represent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668264_8 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668264_8 WHERE incumbent = "Henry Clay"
Write a SQL query that answers the following question: Who were the candidates for election that had a result of a retired jacksonian gain?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668264_8 (candidates VARCHAR, result VARCHAR)
SELECT candidates FROM table_2668264_8 WHERE result = "Retired Jacksonian gain"
Write a SQL query that answers the following question: What ended up happening in the district Virginia 22?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_25 (result VARCHAR, district VARCHAR)
SELECT result FROM table_2668329_25 WHERE district = "Virginia 22"
Write a SQL query that answers the following question: What party won the Virginia 4 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_25 (party VARCHAR, district VARCHAR)
SELECT party FROM table_2668329_25 WHERE district = "Virginia 4"
Write a SQL query that answers the following question: How many people won the election in the district of Virginia 4?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_25 (result VARCHAR, district VARCHAR)
SELECT COUNT(result) FROM table_2668329_25 WHERE district = "Virginia 4"
Write a SQL query that answers the following question: Who is the incumbent in the Virginia 6 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_25 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668329_25 WHERE district = "Virginia 6"
Write a SQL query that answers the following question: What is Samuel Smith's party?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_11 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668329_11 WHERE incumbent = "Samuel Smith"
Write a SQL query that answers the following question: what is Peter Little's party?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_11 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668329_11 WHERE incumbent = "Peter Little"
Write a SQL query that answers the following question: What was the result of Samuel Smith's race?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_11 (result VARCHAR, incumbent VARCHAR)
SELECT result FROM table_2668329_11 WHERE incumbent = "Samuel Smith"
Write a SQL query that answers the following question: Name the result for north carolina 9
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_18 (result VARCHAR, district VARCHAR)
SELECT COUNT(result) FROM table_2668329_18 WHERE district = "North Carolina 9"
Write a SQL query that answers the following question: Name the party for hutchins g. burton
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_18 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668329_18 WHERE incumbent = "Hutchins G. Burton"
Write a SQL query that answers the following question: Name the result for thomas h. hall (dr) 53.0% william clarke (f) 47.0%
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_18 (result VARCHAR, candidates VARCHAR)
SELECT COUNT(result) FROM table_2668329_18 WHERE candidates = "Thomas H. Hall (DR) 53.0% William Clarke (F) 47.0%"
Write a SQL query that answers the following question: Name the candidates for felix walker
The relevant table was constructed using the following SQL : CREATE TABLE table_2668329_18 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668329_18 WHERE incumbent = "Felix Walker"
Write a SQL query that answers the following question: Who are the candidates when the incumbent is john pegram?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668336_24 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668336_24 WHERE incumbent = "John Pegram"
Write a SQL query that answers the following question: Who are the candidates for district virginia 12?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668336_24 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668336_24 WHERE district = "Virginia 12"
Write a SQL query that answers the following question: What is the result when the candidates are alexander smyth (dr) 100%
The relevant table was constructed using the following SQL : CREATE TABLE table_2668336_24 (result VARCHAR, candidates VARCHAR)
SELECT result FROM table_2668336_24 WHERE candidates = "Alexander Smyth (DR) 100%"
Write a SQL query that answers the following question: How many times is the candidates charles f. mercer (f) 100%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668336_24 (incumbent VARCHAR, candidates VARCHAR)
SELECT COUNT(incumbent) FROM table_2668336_24 WHERE candidates = "Charles F. Mercer (F) 100%"
Write a SQL query that answers the following question: how many times was the incumbent is john b. yates?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_14 (party VARCHAR, incumbent VARCHAR)
SELECT COUNT(party) FROM table_2668347_14 WHERE incumbent = "John B. Yates"
Write a SQL query that answers the following question: when was the first elected when the candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_14 (first_elected VARCHAR, candidates VARCHAR)
SELECT first_elected FROM table_2668347_14 WHERE candidates = "Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%"
Write a SQL query that answers the following question: who are the candidates for district new york 10?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_14 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668347_14 WHERE district = "New York 10"
Write a SQL query that answers the following question: how many times were the candidates thomas h. hubbard (dr) 51.5% simeon ford (f) 48.4%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_14 (party VARCHAR, candidates VARCHAR)
SELECT COUNT(party) FROM table_2668347_14 WHERE candidates = "Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%"
Write a SQL query that answers the following question: what is the district when the party is federalist and first elected is 1814?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_14 (district VARCHAR, party VARCHAR, first_elected VARCHAR)
SELECT district FROM table_2668347_14 WHERE party = "Federalist" AND first_elected = "1814"
Write a SQL query that answers the following question: Name the candidates for pennsylvania 14
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_17 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668347_17 WHERE district = "Pennsylvania 14"
Write a SQL query that answers the following question: Name the incumbent for jacob spangler (dr) 67.1% jacob hay (f) 32.9%
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_17 (incumbent VARCHAR, candidates VARCHAR)
SELECT incumbent FROM table_2668347_17 WHERE candidates = "Jacob Spangler (DR) 67.1% Jacob Hay (F) 32.9%"
Write a SQL query that answers the following question: Name the most first elected
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_17 (first_elected INTEGER)
SELECT MAX(first_elected) FROM table_2668347_17
Write a SQL query that answers the following question: Name the number of candidates for samuel d. ingham
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_17 (candidates VARCHAR, incumbent VARCHAR)
SELECT COUNT(candidates) FROM table_2668347_17 WHERE incumbent = "Samuel D. Ingham"
Write a SQL query that answers the following question: Which district did William A. Burwell (Dr) belong to?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668347_22 (district VARCHAR, candidates VARCHAR)
SELECT district FROM table_2668347_22 WHERE candidates = "William A. Burwell (DR)"
Write a SQL query that answers the following question: What was the result in the district represented by Thomas R. Gold?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_13 (result VARCHAR, incumbent VARCHAR)
SELECT result FROM table_2668367_13 WHERE incumbent = "Thomas R. Gold"
Write a SQL query that answers the following question: Who is every incumbent when Kentucky 2 is the district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668352_5 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668352_5 WHERE district = "Kentucky 2"
Write a SQL query that answers the following question: Who is first elected when Kentucky 6 is the district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668352_5 (first_elected VARCHAR, district VARCHAR)
SELECT first_elected FROM table_2668352_5 WHERE district = "Kentucky 6"
Write a SQL query that answers the following question: What is every district for incumbent Joseph Desha?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668352_5 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668352_5 WHERE incumbent = "Joseph Desha"
Write a SQL query that answers the following question: Which party experienced a result of lost re-election democratic-republican hold?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668352_16 (party VARCHAR, result VARCHAR)
SELECT party FROM table_2668352_16 WHERE result = "Lost re-election Democratic-Republican hold"
Write a SQL query that answers the following question: How many districts have John C. Calhoun as the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668352_16 (district VARCHAR, incumbent VARCHAR)
SELECT COUNT(district) FROM table_2668352_16 WHERE incumbent = "John C. Calhoun"
Write a SQL query that answers the following question: Who was the incumbent in the Kentucky 8 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_7 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668367_7 WHERE district = "Kentucky 8"
Write a SQL query that answers the following question: What was the result in the election in the Kentucky 8 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_7 (result VARCHAR, district VARCHAR)
SELECT result FROM table_2668367_7 WHERE district = "Kentucky 8"
Write a SQL query that answers the following question: What was the result in the election in the Kentucky 1 district?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_7 (result VARCHAR, district VARCHAR)
SELECT result FROM table_2668367_7 WHERE district = "Kentucky 1"
Write a SQL query that answers the following question: What district had an election with incumbent john smilie?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_13 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668374_13 WHERE incumbent = "John Smilie"
Write a SQL query that answers the following question: How many districts first elected someone in 1808 and had george smith as the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_13 (district VARCHAR, first_elected VARCHAR, incumbent VARCHAR)
SELECT COUNT(district) FROM table_2668374_13 WHERE first_elected = "1808" AND incumbent = "George Smith"
Write a SQL query that answers the following question: Who was the incumbent in Virginia 3?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_18 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668374_18 WHERE district = "Virginia 3"
Write a SQL query that answers the following question: What incumbent was a federalist that was first elected in 1803?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_18 (incumbent VARCHAR, party VARCHAR, first_elected VARCHAR)
SELECT incumbent FROM table_2668374_18 WHERE party = "Federalist" AND first_elected = "1803"
Write a SQL query that answers the following question: How many parties were first elected in 1805?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_18 (party VARCHAR, first_elected VARCHAR)
SELECT COUNT(party) FROM table_2668374_18 WHERE first_elected = "1805"
Write a SQL query that answers the following question: What district was John Dawson from?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_18 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668374_18 WHERE incumbent = "John Dawson"
Write a SQL query that answers the following question: Who were the running candidates when Samuel Riker was the incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668374_10 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668374_10 WHERE incumbent = "Samuel Riker"
Write a SQL query that answers the following question: Who were the candidates in the district where the incumbent was Nathaniel Macon?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_14 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_2668367_14 WHERE incumbent = "Nathaniel Macon"
Write a SQL query that answers the following question: What party did the incumbent Joseph Pearson belong to?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668367_14 (party VARCHAR, incumbent VARCHAR)
SELECT party FROM table_2668367_14 WHERE incumbent = "Joseph Pearson"
Write a SQL query that answers the following question: How many incumbents are there in Pennsylvania 5?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_12 (incumbent VARCHAR, district VARCHAR)
SELECT COUNT(incumbent) FROM table_2668401_12 WHERE district = "Pennsylvania 5"
Write a SQL query that answers the following question: What are the parties listed for Pennsylvania 8?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_12 (party VARCHAR, district VARCHAR)
SELECT party FROM table_2668401_12 WHERE district = "Pennsylvania 8"
Write a SQL query that answers the following question: Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%.
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_12 (incumbent VARCHAR, candidates VARCHAR)
SELECT incumbent FROM table_2668401_12 WHERE candidates = "Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%"
Write a SQL query that answers the following question: What was the result for Andrew Gregg?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_12 (result VARCHAR, incumbent VARCHAR)
SELECT result FROM table_2668401_12 WHERE incumbent = "Andrew Gregg"
Write a SQL query that answers the following question: What was the result for Pennsylvania 8?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_12 (result VARCHAR, district VARCHAR)
SELECT result FROM table_2668401_12 WHERE district = "Pennsylvania 8"
Write a SQL query that answers the following question: What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_17 (party VARCHAR, district VARCHAR, result VARCHAR, first_elected VARCHAR)
SELECT party FROM table_2668401_17 WHERE result = "Re-elected" AND first_elected = "1797" AND district = "Virginia 5"
Write a SQL query that answers the following question: When was the incumbent first elected in the district where the result was a democratic-republican gain?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_17 (first_elected VARCHAR, result VARCHAR)
SELECT first_elected FROM table_2668401_17 WHERE result = "Democratic-Republican gain"
Write a SQL query that answers the following question: In what district was the incumbent Edwin Gray?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_17 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668401_17 WHERE incumbent = "Edwin Gray"
Write a SQL query that answers the following question: When was the incumbent from the Virginia 10 district first elected?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668401_17 (first_elected VARCHAR, district VARCHAR)
SELECT first_elected FROM table_2668401_17 WHERE district = "Virginia 10"
Write a SQL query that answers the following question: Name the result for walter jones (dr) 99.0% henry lee (f) 1.0%
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (result VARCHAR, candidates VARCHAR)
SELECT result FROM table_2668387_18 WHERE candidates = "Walter Jones (DR) 99.0% Henry Lee (F) 1.0%"
Write a SQL query that answers the following question: Name the district for matthew clay
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668387_18 WHERE incumbent = "Matthew Clay"
Write a SQL query that answers the following question: Name the number of first elected for john smith
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (first_elected VARCHAR, incumbent VARCHAR)
SELECT COUNT(first_elected) FROM table_2668387_18 WHERE incumbent = "John Smith"
Write a SQL query that answers the following question: Name the incumbent for virginia 18
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668387_18 WHERE district = "Virginia 18"
Write a SQL query that answers the following question: Name the district for john randolph (dr)
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (district VARCHAR, candidates VARCHAR)
SELECT district FROM table_2668387_18 WHERE candidates = "John Randolph (DR)"
Write a SQL query that answers the following question: Name the incumbent for virginia 4
The relevant table was constructed using the following SQL : CREATE TABLE table_2668387_18 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668387_18 WHERE district = "Virginia 4"
Write a SQL query that answers the following question: When was the earliest person elected?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668420_17 (first_elected INTEGER)
SELECT MIN(first_elected) FROM table_2668420_17
Write a SQL query that answers the following question: What party was re-elected to Virginia 12?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668420_17 (party VARCHAR, result VARCHAR, district VARCHAR)
SELECT party FROM table_2668420_17 WHERE result = "Re-elected" AND district = "Virginia 12"
Write a SQL query that answers the following question: What is the latest first elected?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668405_17 (first_elected INTEGER)
SELECT MAX(first_elected) FROM table_2668405_17
Write a SQL query that answers the following question: How many times were the candidates leven powell (f) 63.8% roger west (dr) 36.4%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668405_17 (first_elected VARCHAR, candidates VARCHAR)
SELECT COUNT(first_elected) FROM table_2668405_17 WHERE candidates = "Leven Powell (F) 63.8% Roger West (DR) 36.4%"
Write a SQL query that answers the following question: What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668405_17 (district VARCHAR, candidates VARCHAR)
SELECT district FROM table_2668405_17 WHERE candidates = "Leven Powell (F) 63.8% Roger West (DR) 36.4%"
Write a SQL query that answers the following question: What is the district with the incumbent john nicholas?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668405_17 (district VARCHAR, incumbent VARCHAR)
SELECT district FROM table_2668405_17 WHERE incumbent = "John Nicholas"
Write a SQL query that answers the following question: How many were in district virginia 6?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668405_17 (candidates VARCHAR, district VARCHAR)
SELECT COUNT(candidates) FROM table_2668405_17 WHERE district = "Virginia 6"
Write a SQL query that answers the following question: If the district is Virginia 8, who is the Incumbent?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668416_18 (incumbent VARCHAR, district VARCHAR)
SELECT incumbent FROM table_2668416_18 WHERE district = "Virginia 8"
Write a SQL query that answers the following question: If the district is Virginia 17, who are the candidates?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668416_18 (candidates VARCHAR, district VARCHAR)
SELECT candidates FROM table_2668416_18 WHERE district = "Virginia 17"
Write a SQL query that answers the following question: In how many different parts was the incumbent Abraham B. Venable?
The relevant table was constructed using the following SQL : CREATE TABLE table_2668416_18 (party VARCHAR, incumbent VARCHAR)
SELECT COUNT(party) FROM table_2668416_18 WHERE incumbent = "Abraham B. Venable"
Write a SQL query that answers the following question: What is the date for the mount panorama circuit?
The relevant table was constructed using the following SQL : CREATE TABLE table_26686908_2 (date VARCHAR, circuit VARCHAR)
SELECT date FROM table_26686908_2 WHERE circuit = "Mount Panorama circuit"
Write a SQL query that answers the following question: What was the location for the date 7–10 october?
The relevant table was constructed using the following SQL : CREATE TABLE table_26686908_2 (city___state VARCHAR, date VARCHAR)
SELECT city___state FROM table_26686908_2 WHERE date = "7–10 October"