text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What year was incumbent mark w. hannaford elected?
<|assistant|>
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Mark W. Hannaford';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the district where the incumbent is richard kelly?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Richard Kelly';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the result where the candidates is robert l. f. sikes (d) unopposed?
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Robert L. F. Sikes (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: who is the incumbent where the candidates is william v. chappell, jr. (d) unopposed?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='William V. Chappell, Jr. (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the district where the incumbent is james a. haley?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='James A. Haley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the district where the incumbent is richard kelly?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Richard Kelly';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: who are the candidates where the district is florida 8?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Florida 8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what year was the first elected incumbant Sidney R. Yates?
<|assistant|>
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Sidney R. Yates';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many incumbents are there in district Louisiana 5?
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many incumbents resulted in a lost renomination republican gain?
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "result"='Lost renomination Republican gain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: In which district is the incumbent John Breaux?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Breaux';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What year was Otto Passman (d) unopposed first elected?
<|assistant|>
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Otto Passman (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What were the results when the incumbent was John Breaux?
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Breaux';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidates for texas 1
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the incumbent for district texas 12
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidates for texas 20
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 20';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the district with the candidates edward boland (d) unopposed?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Edward Boland (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the party where the candidates are edward boland (d) unopposed?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Edward Boland (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the party where the incumbent is edward boland?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edward Boland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many times was the candidates paul tsongas (d) 60.6% paul w. cronin (r) 39.4%?
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Paul Tsongas (D) 60.6% Paul W. Cronin (R) 39.4%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: List all candidates in elections where the incumbent politician is Goodloe Byron.
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Goodloe Byron';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many instances are there of party in the situation where Robert Bauman is the incumbent politician?
<|assistant|>
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert Bauman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What is the party of the election in which Robert Bauman is the incumbent?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert Bauman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: List all results where the voting district is Maryland 7.
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Maryland 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What are all the results where Robert Bauman is the incumbent politician?
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert Bauman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates in the district won by the incumbent Del Latta?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Del Latta';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates in the districts that was first elected in 1966?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1966;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341690_5" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who was running for office in the California 10 district?
<|assistant|>
SELECT "candidates" FROM "table1_1341690_5" WHERE "district"='California 10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341690_5" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many parties won the election in the California 23 district?
<|assistant|>
SELECT COUNT("party") FROM "table1_1341690_5" WHERE "district"='California 23';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341690_5" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What republican candidate was first elected most recently?
<|assistant|>
SELECT MAX("first_elected") FROM "table1_1341690_5" WHERE "party"='Republican';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Phillip Landrum was first elected in 1952 from the ninth district of Georgia.
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1952;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341707_15" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: What party did the incumbent from the Illinois 12 district belong to?
<|assistant|>
SELECT "party" FROM "table1_1341707_15" WHERE "district"='Illinois 12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341707_15" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Who was the democratic incumbent in the Illinois 11 district who was re-elected?
<|assistant|>
SELECT "incumbent" FROM "table1_1341707_15" WHERE "party"='Democratic' AND "result"='Re-elected' AND "district"='Illinois 11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341707_15" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Which incumbent was first elected in 1964?
<|assistant|>
SELECT "incumbent" FROM "table1_1341707_15" WHERE "first_elected"='1964';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341707_15" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: What party did the incumbent from the Illinois 1 district belong to?
<|assistant|>
SELECT "party" FROM "table1_1341707_15" WHERE "district"='Illinois 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What candidates ran in the election with don fuqua?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Don Fuqua';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many incumbent candidates in the election featuring sam m. gibbons (d) unopposed?
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Sam M. Gibbons (D) Unopposed';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What is the last year that someone is first elected?
<|assistant|>
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who was the incumbent in 1940?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1940;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the party when the incumbent is sidney r. yates?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Sidney R. Yates';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what was the year first elected for district illinois 7?
<|assistant|>
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Illinois 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many times was the candidates phil crane (r) 58.0% edward a. warman (d) 42.0%?
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Phil Crane (R) 58.0% Edward A. Warman (D) 42.0%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many times was it the district illinois 18?
<|assistant|>
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "district"='Illinois 18';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: who were the candidates when the incumbent was ed derwinski?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ed Derwinski';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: When was the first elected when the party was republican and the candidate were robert h. michel (r) 66.1% rosa lee fox (d) 33.9%?
<|assistant|>
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e" WHERE "party"='Republican' AND "candidates"='Robert H. Michel (R) 66.1% Rosa Lee Fox (D) 33.9%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who is the incumbent in district Texas 15?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 15';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Which district elected incumbent Earle Cabell?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Earle Cabell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What was the result when Ray Roberts was elected?
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ray Roberts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What is the highest year that a candidate was first elected?
<|assistant|>
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Incumbent Bill Harsha was the winner in an election in which the candidates were who?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Bill Harsha';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What was the party of the first elected candidate in 1954?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1954;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many districts does Donald D. Clancy represent?
<|assistant|>
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Donald D. Clancy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Which party is Lawrence H. Fountain part of?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Lawrence H. Fountain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Who was the first person elected in North Carolina 8?
<|assistant|>
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='North Carolina 8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: who was the candidate elected to the democratic party in 1952?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1952' AND "party"='Democratic';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district did Joe Waggonner belong to?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Joe Waggonner';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What is the name of the incumbent who was first eleccted in 1940?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1940;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What party does incumbent edwin reinecke represent?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edwin Reinecke';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates in the election that featured incumbent don edwards?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Don Edwards';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Who's the incumbent of Indiana 4 district?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Indiana 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Who's the incumbent of the district with first election held in 1950?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1950';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: Who was featured in the election of charles edward bennett redistricted from 2nd?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles Edward Bennett Redistricted from 2nd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the first elected for the republican party
<|assistant|>
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "party"='Republican';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the district with philip philbin
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Philip Philbin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the party with edward boland
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edward Boland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What was the district who had their first elected in 1966?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1966;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who was the candidate when the incumbent was Richard C. White?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Richard C. White';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district did Donald Ray Matthews belong to?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Donald Ray Matthews';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What party did Don Fuqua belong to?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Don Fuqua';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many parties won the election in the Louisiana 5 district?
<|assistant|>
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many candidates were elected in the Louisiana 4 district?
<|assistant|>
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who was the winner in the Louisiana 7 district?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Louisiana 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what's party with district being tennessee 3
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many party with district being tennessee 1
<|assistant|>
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what's party with district being tennessee 3
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many incumbent with district being tennessee 5
<|assistant|>
SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what's incumbent with district being tennessee 5
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Tennessee 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who ran in the race for Jack Brooks' seat?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Jack Brooks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: which section did seymour halpern run in
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Seymour Halpern';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district is incumbent albert w. johnson from?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Albert W. Johnson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many times was frank m. clark the incumbent?
<|assistant|>
SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Frank M. Clark';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district is incumbent elmer j. holland from?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Elmer J. Holland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: To which party does Frank T. Bow belong?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Frank T. Bow';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who ran in the race for the seat of incumbent Carl W. Rich?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Carl W. Rich';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: In which district is the incumbent Carl W. Rich?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Carl W. Rich';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidates where incumbent Carl Vinson is?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Carl Vinson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidates for massachusetts 8
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Massachusetts 8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What candidates were in the election when a republican was re-elected?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "party"='Republican';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district is incumbent frank chelf from?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Frank Chelf';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many districts represented Edwin E. Willis?
<|assistant|>
SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edwin E. Willis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were all the candidates when the first elected year was 1961?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1961;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What party did Hale Boggs belong to?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Hale Boggs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the political affiliation of the texas 12 district
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many voted in the texas 6 section
<|assistant|>
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='Texas 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what is the political affiliation of ray roberts
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ray Roberts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district featured an election between james a. byrne (d) 59.3% joseph r. burns (r) 40.7%?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='James A. Byrne (D) 59.3% Joseph R. Burns (R) 40.7%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidates for massachusetts 6
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Massachusetts 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the result for massachusetts 3
<|assistant|>
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Massachusetts 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the candidate first elected in 1942
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1942;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "united_states_house_of_representatives_e" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the party for massachusetts 3
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Massachusetts 3';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.