text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "texas" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the first elected for texas 6 district
<|assistant|>
SELECT "first_elected" FROM "texas" WHERE "district"='Texas 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "texas" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Name the incumbent for texas 22 district
<|assistant|>
SELECT "incumbent" FROM "texas" WHERE "district"='Texas 22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How did the election in the Florida 14 district end?
<|assistant|>
SELECT "results" FROM "florida" WHERE "district"='Florida 14';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who's the incumbent of Florida 12 district?
<|assistant|>
SELECT "incumbent" FROM "florida" WHERE "district"='Florida 12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who is the incumbent of Florida 9?
<|assistant|>
SELECT "incumbent" FROM "florida" WHERE "district"='Florida 9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who's the incumbent in Florida 6?
<|assistant|>
SELECT "incumbent" FROM "florida" WHERE "district"='Florida 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What party does Bill McCollum belong to?
<|assistant|>
SELECT "party" FROM "florida" WHERE "incumbent"='Bill McCollum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What are the results in the county with Peter Deutsch as a candidate?
<|assistant|>
SELECT "results" FROM "florida" WHERE "incumbent"='Peter Deutsch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How did the election end for Robert Wexler?
<|assistant|>
SELECT "results" FROM "florida" WHERE "incumbent"='Robert Wexler';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What party was the winner in the district Maryland 6?
<|assistant|>
SELECT "party" FROM "maryland" WHERE "district"='Maryland 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who run for office in district Maryland 3?
<|assistant|>
SELECT "candidates" FROM "maryland" WHERE "district"='Maryland 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: List the candidates in district Maryland 1 where the republican party won.
<|assistant|>
SELECT "candidates" FROM "maryland" WHERE "party"='Republican' AND "district"='Maryland 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "maryland" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: When did the elections take place in district Maryland 2?
<|assistant|>
SELECT MIN("first_elected") FROM "maryland" WHERE "district"='Maryland 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_jersey" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What party is Frank Lobiondo a member of?
<|assistant|>
SELECT "party" FROM "new_jersey" WHERE "incumbent"='Frank LoBiondo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_jersey" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who were the candidates in the district whose incumbent is Bill Pascrell?
<|assistant|>
SELECT "candidates" FROM "new_jersey" WHERE "incumbent"='Bill Pascrell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_jersey" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What is the party of the district incumbent Jim Saxton?
<|assistant|>
SELECT "party" FROM "new_jersey" WHERE "incumbent"='Jim Saxton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What party is John McHugh a member of?
<|assistant|>
SELECT "party" FROM "new_york" WHERE "incumbent"='John McHugh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What's the party elected in the district that first elected in 1990?
<|assistant|>
SELECT "party" FROM "new_york" WHERE "first_elected"='1990';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What's the first elected year of the district that Ed Towns is an incumbent of?
<|assistant|>
SELECT "first_elected" FROM "new_york" WHERE "incumbent"='Ed Towns';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: How many elections have resulted in retired democratic hold?
<|assistant|>
SELECT COUNT("party") FROM "new_york" WHERE "results"='Retired Democratic hold';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: What were the candidates in the district that first elected in 1980?
<|assistant|>
SELECT "candidates" FROM "new_york" WHERE "first_elected"='1980';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: When was Chaka Fattah first elected in the Pennsylvania 2 district?
<|assistant|>
SELECT "first_elected" FROM "pennsylvania" WHERE "district"='Pennsylvania 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: How many incumbents were first elected in 1984?
<|assistant|>
SELECT COUNT("incumbent") FROM "pennsylvania" WHERE "first_elected"='1984';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: When was incumbent Bud Shuster first elected?
<|assistant|>
SELECT "first_elected" FROM "pennsylvania" WHERE "incumbent"='Bud Shuster';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: How many candidates ran in the election where Mike Doyle was the incumbent?
<|assistant|>
SELECT COUNT("candidates") FROM "pennsylvania" WHERE "incumbent"='Mike Doyle';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: Incumbent Tim Holden belonged to what party?
<|assistant|>
SELECT "party" FROM "pennsylvania" WHERE "incumbent"='Tim Holden';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"results" text,
"candidates" text
);
Question: In what district was Tim Holden the incumbent?
<|assistant|>
SELECT "district" FROM "pennsylvania" WHERE "incumbent"='Tim Holden';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tennessee" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Which incumbent was first elected in 1984?
<|assistant|>
SELECT "incumbent" FROM "tennessee" WHERE "first_elected"=1984;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tennessee" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: When was the incumbent in the Tennessee 4 district first elected?
<|assistant|>
SELECT "first_elected" FROM "tennessee" WHERE "district"='Tennessee 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tennessee" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who are the candidates in the Tennessee 3 district election?
<|assistant|>
SELECT "candidates" FROM "tennessee" WHERE "district"='Tennessee 3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tennessee" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What year was Bob Clement first elected?
<|assistant|>
SELECT MIN("first_elected") FROM "tennessee" WHERE "incumbent"='Bob Clement';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "florida" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: List all the candidates for the seat where the incumbent is Sam Gibbons?
<|assistant|>
SELECT "candidates" FROM "florida" WHERE "incumbent"='Sam Gibbons';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who were the candidates in district Wisconsin 4?
<|assistant|>
SELECT "candidates" FROM "wisconsin" WHERE "district"='Wisconsin 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who's the incumbent in the district that first elected in 1969?
<|assistant|>
SELECT "incumbent" FROM "wisconsin" WHERE "first_elected"=1969;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wisconsin" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: Who's the incumbent of district Wisconsin 5?
<|assistant|>
SELECT "incumbent" FROM "wisconsin" WHERE "district"='Wisconsin 5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: How many districts does gary condit represent?
<|assistant|>
SELECT COUNT("district") FROM "california" WHERE "incumbent"='Gary Condit';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What party was first elected in 1974?
<|assistant|>
SELECT "party" FROM "california" WHERE "first_elected"=1974;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What district is bill thomas from?
<|assistant|>
SELECT "district" FROM "california" WHERE "incumbent"='Bill Thomas';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"results" text,
"candidates" text
);
Question: What district is bill thomas from?
<|assistant|>
SELECT "district" FROM "california" WHERE "incumbent"='Bill Thomas';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who was the incumbent of district Georgia 2?
<|assistant|>
SELECT "incumbent" FROM "georgia" WHERE "district"='Georgia 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What district is Mac Collins an incumbent in?
<|assistant|>
SELECT "district" FROM "georgia" WHERE "incumbent"='Mac Collins';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What's the first elected year of the district who's been the last one to do so?
<|assistant|>
SELECT MAX("first_elected") FROM "georgia";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Who were the candidates in the district where Charlie Norwood is the incumbent?
<|assistant|>
SELECT "candidates" FROM "georgia" WHERE "incumbent"='Charlie Norwood';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "louisiana" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Which result did the Republican have with the incumbent, Billy Tauzin?
<|assistant|>
SELECT "result" FROM "louisiana" WHERE "party"='Republican' AND "incumbent"='Billy Tauzin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "louisiana" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: How many districts was Robert Livingston incumbent in?
<|assistant|>
SELECT COUNT("district") FROM "louisiana" WHERE "incumbent"='Robert Livingston';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "louisiana" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What is the first election year listed?
<|assistant|>
SELECT MIN("first_elected") FROM "louisiana";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "louisiana" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: List all results in elections with Richard Baker as the incumbent.
<|assistant|>
SELECT "result" FROM "louisiana" WHERE "incumbent"='Richard Baker';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many party with district being washington 7
<|assistant|>
SELECT COUNT("party") FROM "washington" WHERE "district"='Washington 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what's the latest first elected year
<|assistant|>
SELECT MAX("first_elected") FROM "washington";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what's the result with district being washington 7
<|assistant|>
SELECT "result" FROM "washington" WHERE "district"='Washington 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "washington" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: what being the minimum first elected with district being washington 7
<|assistant|>
SELECT MIN("first_elected") FROM "washington" WHERE "district"='Washington 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the result for first elected in 1948 , 1964
<|assistant|>
SELECT "result" FROM "illinois" WHERE "first_elected"='1948 , 1964';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the first elected with district illinois 18
<|assistant|>
SELECT "first_elected" FROM "illinois" WHERE "district"='Illinois 18';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the party with candidates jerry weller (r) 51.77% clem balanoff (d) 48.23%
<|assistant|>
SELECT "party" FROM "illinois" WHERE "candidates"='Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the party for the first elected in 1980
<|assistant|>
SELECT "party" FROM "illinois" WHERE "first_elected"='1980';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the result with district illinois 15
<|assistant|>
SELECT "result" FROM "illinois" WHERE "district"='Illinois 15';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "illinois" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" text,
"result" text,
"candidates" text
);
Question: what's the total number of candidates for first elected in 1948 , 1964
<|assistant|>
SELECT COUNT("candidates") FROM "illinois" WHERE "first_elected"='1948 , 1964';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name thedistrict for 1994
<|assistant|>
SELECT "district" FROM "new_york" WHERE "first_elected"=1994;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the result for New York 11
<|assistant|>
SELECT "result" FROM "new_york" WHERE "district"='New York 11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the number of first elected for new york 11
<|assistant|>
SELECT COUNT("first_elected") FROM "new_york" WHERE "district"='New York 11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "new_york" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: Name the first elected for new york 1
<|assistant|>
SELECT COUNT("first_elected") FROM "new_york" WHERE "district"='New York 1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "texas" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: What year was Larry combest elected
<|assistant|>
SELECT "first_elected" FROM "texas" WHERE "incumbent"='Larry Combest';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: To what district does Bill Hefner belong?
<|assistant|>
SELECT "district" FROM "north_carolina" WHERE "incumbent"='Bill Hefner';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: Who ran unsuccessfully against Bill Hefner?
<|assistant|>
SELECT "opponent" FROM "north_carolina" WHERE "incumbent"='Bill Hefner';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: How many districts are respresented by Alex McMillan?
<|assistant|>
SELECT COUNT("status") FROM "north_carolina" WHERE "incumbent"='Alex McMillan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What party is Sanford Bishop a member of?
<|assistant|>
SELECT "party" FROM "georgia" WHERE "incumbent"='Sanford Bishop';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What party won in the district Georgia7?
<|assistant|>
SELECT "party" FROM "georgia" WHERE "district"='Georgia7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "georgia" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What's Georgia5's first elected year?
<|assistant|>
SELECT MAX("first_elected") FROM "georgia" WHERE "district"='Georgia5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: Who opposed Marty Meehan in each election?
<|assistant|>
SELECT "opponent" FROM "massachusetts" WHERE "incumbent"='Marty Meehan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: Who are the opponents in Massachusetts5 district?
<|assistant|>
SELECT "opponent" FROM "massachusetts" WHERE "district"='Massachusetts5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What parties are represented in Massachusetts4 district?
<|assistant|>
SELECT "party" FROM "massachusetts" WHERE "district"='Massachusetts4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "massachusetts" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: Who is the incumbent in district Massachusetts7?
<|assistant|>
SELECT "incumbent" FROM "massachusetts" WHERE "district"='Massachusetts7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341549_33" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many first elected with district being new york2
<|assistant|>
SELECT COUNT("first_elected") FROM "table1_1341549_33" WHERE "district"='New York2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341549_33" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many district with candidates being eliot l. engel (d) 85.2% martin richman (r) 14.8%
<|assistant|>
SELECT COUNT("district") FROM "table1_1341549_33" WHERE "candidates"='Eliot L. Engel (D) 85.2% Martin Richman (R) 14.8%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341549_33" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many candidates with party being democratic and dbeingtrict being new york5
<|assistant|>
SELECT COUNT("candidates") FROM "table1_1341549_33" WHERE "party"='Democratic' AND "district"='New York5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1341549_33" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"result" text,
"candidates" text
);
Question: how many first elected with result being re-elected and incumbent being gary ackerman redistricted from the 7th district
<|assistant|>
SELECT COUNT("first_elected") FROM "table1_1341549_33" WHERE "result"='Re-elected' AND "incumbent"='Gary Ackerman Redistricted from the 7th district';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What party does ron klink represent?
<|assistant|>
SELECT "party" FROM "pennsylvania" WHERE "incumbent"='Ron Klink';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: Who was in the election that was for incumbent bud shuster's seat?
<|assistant|>
SELECT "opponent" FROM "pennsylvania" WHERE "incumbent"='Bud Shuster';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What district had someone first elected in 1982?
<|assistant|>
SELECT "district" FROM "pennsylvania" WHERE "first_elected"=1982;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: How many republican incumbents first elected in 1974?
<|assistant|>
SELECT COUNT("incumbent") FROM "pennsylvania" WHERE "party"='Republican' AND "first_elected"=1974;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "pennsylvania" (
"district" text,
"incumbent" text,
"party" text,
"first_elected" real,
"status" text,
"opponent" text
);
Question: What was the result of the election where william f. goodling was the incumbent?
<|assistant|>
SELECT "status" FROM "pennsylvania" WHERE "incumbent"='William F. Goodling';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What party did incumbent Howard Coble belong to?
<|assistant|>
SELECT "party" FROM "north_carolina" WHERE "incumbent"='Howard Coble';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What party did incumbent Stephen L. Neal belong to?
<|assistant|>
SELECT "party" FROM "north_carolina" WHERE "incumbent"='Stephen L. Neal';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: In how many districts was the democratic incumbent elected in 1974?
<|assistant|>
SELECT COUNT("district") FROM "north_carolina" WHERE "party"='Democratic' AND "elected"=1974;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "north_carolina" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What year was incumbent Martin Lancaster elected?
<|assistant|>
SELECT MIN("elected") FROM "north_carolina" WHERE "incumbent"='Martin Lancaster';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "minnesota" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What are the locations where the year of election is 1980?
<|assistant|>
SELECT "district" FROM "minnesota" WHERE "elected"=1980;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "minnesota" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What location is Vin Weber from?
<|assistant|>
SELECT "district" FROM "minnesota" WHERE "incumbent"='Vin Weber';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "texas" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What is Larry Combest's district?
<|assistant|>
SELECT "district" FROM "texas" WHERE "incumbent"='Larry Combest';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "texas" (
"district" text,
"incumbent" text,
"party" text,
"elected" real,
"status" text,
"opponent" text
);
Question: What is the status of incumbent Charles Stenholm?
<|assistant|>
SELECT "status" FROM "texas" WHERE "incumbent"='Charles Stenholm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"elected" text,
"status" text,
"opponent" text
);
Question: How many incumbents represent district California 34?
<|assistant|>
SELECT COUNT("incumbent") FROM "california" WHERE "district"='California 34';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"elected" text,
"status" text,
"opponent" text
);
Question: What is the elected status of the Democratic party in 1989?
<|assistant|>
SELECT "status" FROM "california" WHERE "party"='Democratic' AND "elected"='1989';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"elected" text,
"status" text,
"opponent" text
);
Question: Who are the opponents in district California 9?
<|assistant|>
SELECT "opponent" FROM "california" WHERE "district"='California 9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "california" (
"district" text,
"incumbent" text,
"party" text,
"elected" text,
"status" text,
"opponent" text
);
Question: Who are the incumbents elected in 1974?
<|assistant|>
SELECT "incumbent" FROM "california" WHERE "elected"='1974';<|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 incumbent was first elected in 1958?
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1958;<|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 all the candidates who ran in the district where Ralph Regula is the incumbent?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Ralph Regula';<|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 party does Del Latta belong to?
<|assistant|>
SELECT "party" 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: Which party does Tom Luken belong to?
<|assistant|>
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tom Luken';<|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 incumbent was Tim Valentine?
<|assistant|>
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Tim Valentine';<|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 first elected 1958
<|assistant|>
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1958;<|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 for 1952?
<|assistant|>
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "first_elected"=1952;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.