text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26638600_3" ( "rnd" real, "circuit" text, "lites_1_race_one_winning_team" text, "lites_2_race_one_winning_team" text, "lites_1_race_two_winning_team" text, "lites_2_race_two_winning_team" text ); Question: On which circuit was the lites 1 race one winning team #66 Gunnar Racing? <|assistant|> SELECT "circuit" FROM "table1_26638600_3" WHERE "lites_1_race_one_winning_team"='#66 Gunnar Racing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26638600_3" ( "rnd" real, "circuit" text, "lites_1_race_one_winning_team" text, "lites_2_race_one_winning_team" text, "lites_1_race_two_winning_team" text, "lites_2_race_two_winning_team" text ); Question: On which circuit was the lites race two winning team #13 Inspire Motorsports? <|assistant|> SELECT "circuit" FROM "table1_26638600_3" WHERE "lites_1_race_two_winning_team"='#13 Inspire Motorsports';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26638600_3" ( "rnd" real, "circuit" text, "lites_1_race_one_winning_team" text, "lites_2_race_one_winning_team" text, "lites_1_race_two_winning_team" text, "lites_2_race_two_winning_team" text ); Question: Who was the lites 2 race two winning team when #13 Inspire Motorsports was the Lites 1 race one winning team? <|assistant|> SELECT "lites_2_race_two_winning_team" FROM "table1_26638600_3" WHERE "lites_1_race_one_winning_team"='#13 Inspire Motorsports';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2667438_5" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" text ); Question: What date did series number 32 premiere? <|assistant|> SELECT "original_air_date" FROM "table1_2667438_5" WHERE "no_in_series"=32;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26677836_1" ( "place" real, "nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "table_points" real ); Question: WHat is the highest difference? <|assistant|> SELECT MAX("difference") FROM "table1_26677836_1";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26677836_1" ( "place" real, "nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "table_points" real ); Question: What is the nation when the for is 326? <|assistant|> SELECT "nation" FROM "table1_26677836_1" WHERE "for"=326;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26677836_1" ( "place" real, "nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "table_points" real ); Question: What is the highest lost? <|assistant|> SELECT MAX("lost") FROM "table1_26677836_1";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26677836_1" ( "place" real, "nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "table_points" real ); Question: What is the nation when the place is 2? <|assistant|> SELECT "nation" FROM "table1_26677836_1" WHERE "place"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_26677836_1" ( "place" real, "nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "table_points" real ); Question: How many times is the nation [[|]] (19)? <|assistant|> SELECT COUNT("against") FROM "table1_26677836_1" WHERE "nation"='[[|]] (19)';<|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, "result" text, "candidates" text ); Question: Which party does the incumbent Mathias Morris belong to? <|assistant|> SELECT "party" FROM "pennsylvania" WHERE "incumbent"='Mathias Morris';<|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, "result" text, "candidates" text ); Question: Which district does the incumbent Luther Reily represent? <|assistant|> SELECT "district" FROM "pennsylvania" WHERE "incumbent"='Luther Reily';<|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, "result" text, "candidates" text ); Question: Who are the candidates for the Pennsylvania 11 district? <|assistant|> SELECT "candidates" FROM "pennsylvania" WHERE "district"='Pennsylvania 11';<|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, "result" text, "candidates" text ); Question: How many people won the election in the Pennsylvania 11 district? <|assistant|> SELECT COUNT("candidates") FROM "pennsylvania" WHERE "district"='Pennsylvania 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668173_4" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: How many times did the incumbent was first elected and then lost re-election anti-masonic gain? <|assistant|> SELECT COUNT("first_elected") FROM "table1_2668173_4" WHERE "result"='Lost re-election Anti-Masonic gain';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668173_4" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Who were the candidates if the incumbent was Henry Logan? <|assistant|> SELECT "candidates" FROM "table1_2668173_4" WHERE "incumbent"='Henry Logan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668173_4" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: What was the district of the incumbent Mathias Morris? <|assistant|> SELECT "district" FROM "table1_2668173_4" WHERE "incumbent"='Mathias Morris';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668173_4" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: How many incumbents was first elected in the Anti-Masonic party? <|assistant|> SELECT COUNT("first_elected") FROM "table1_2668173_4" WHERE "party"='Anti-Masonic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668243_17" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Name the incumbent for robert monell (j) 63.6% tilly lynde 36.4% <|assistant|> SELECT "incumbent" FROM "table1_2668243_17" WHERE "candidates"='Robert Monell (J) 63.6% Tilly Lynde 36.4%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668243_17" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Name the number of first elected for thomas maxwell (j) 60.1% david woodcock (aj) 39.9% <|assistant|> SELECT COUNT("first_elected") FROM "table1_2668243_17" WHERE "candidates"='Thomas Maxwell (J) 60.1% David Woodcock (AJ) 39.9%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668243_17" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Name the candidates for new york 21 <|assistant|> SELECT "candidates" FROM "table1_2668243_17" WHERE "district"='New York 21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668243_17" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Name the candidates for selah r. hobbie <|assistant|> SELECT "candidates" FROM "table1_2668243_17" WHERE "incumbent"='Selah R. Hobbie';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668243_17" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Name the result for james lent (j) 52.3% silas wood (aj) 47.7% <|assistant|> SELECT "result" FROM "table1_2668243_17" WHERE "candidates"='James Lent (J) 52.3% Silas Wood (AJ) 47.7%';<|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, "result" text, "candidates" text ); Question: Who were the candidates in districk Pennsylvania 12? <|assistant|> SELECT "candidates" FROM "pennsylvania" WHERE "district"='Pennsylvania 12';<|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, "result" text, "candidates" text ); Question: What is the result for district pennsylvania 6? <|assistant|> SELECT "result" FROM "pennsylvania" WHERE "district"='Pennsylvania 6';<|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, "result" text, "candidates" text ); Question: Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%? <|assistant|> SELECT "incumbent" FROM "pennsylvania" WHERE "candidates"='John Banks (AM) 52.2% Samuel Power (J) 47.8%';<|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, "result" text, "candidates" text ); Question: How many times was the result was re-elected and the party was anti-masonic in the district Pennsylvania 24? <|assistant|> SELECT COUNT("first_elected") FROM "pennsylvania" WHERE "result"='Re-elected' AND "party"='Anti-Masonic' AND "district"='Pennsylvania 24';<|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, "result" text, "candidates" text ); Question: Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jacksonian? <|assistant|> SELECT "candidates" FROM "pennsylvania" WHERE "result"='Re-elected' AND "first_elected"='1832' AND "party"='Jacksonian';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competitive_history" ( "year" real, "competition" text, "location" text, "apparatus" text, "rank_final" real, "score_final" text, "rank_qualifying" real, "score_qualifying" text ); Question: In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850 <|assistant|> SELECT MAX("rank_qualifying") FROM "competitive_history" WHERE "location"='Ghent' AND "year"=2011 AND "score_qualifying"='14.850';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competitive_history" ( "year" real, "competition" text, "location" text, "apparatus" text, "rank_final" real, "score_final" text, "rank_qualifying" real, "score_qualifying" text ); Question: What was the maximum rank-final score on the floor exercise? <|assistant|> SELECT MAX("rank_final") FROM "competitive_history" WHERE "apparatus"='Floor Exercise';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competitive_history" ( "year" real, "competition" text, "location" text, "apparatus" text, "rank_final" real, "score_final" text, "rank_qualifying" real, "score_qualifying" text ); Question: What was the maximum rank-final value for a score of 14.975? <|assistant|> SELECT MAX("rank_final") FROM "competitive_history" WHERE "score_final"='14.975';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "competitive_history" ( "year" real, "competition" text, "location" text, "apparatus" text, "rank_final" real, "score_final" text, "rank_qualifying" real, "score_qualifying" text ); Question: Where did the event with a final score of 15.050 occur? <|assistant|> SELECT "location" FROM "competitive_history" WHERE "score_final"='15.050';<|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: how many "Party" are in district south carolina 2? <|assistant|> SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 2';<|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: What "party" was re-elected in district South Carolina 7? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='South Carolina 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" text, "result" text, "candidates" text ); Question: who were the "candidate" of South Carolina 6? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 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" text, "result" text, "candidates" text ); Question: Who was the "incumbent" of district south carolina 7? <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='South Carolina 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" text, "result" text, "candidates" text ); Question: How many people were first elected when john roane was the incumbent? <|assistant|> SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Roane';<|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: What party did john s. barbour represent? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John S. Barbour';<|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: What was the result of the election featuring andrew stevenson (j) 100%? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Andrew Stevenson (J) 100%';<|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: What candidate(s) ran for election when nathaniel h. claiborne was the incumbent? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Nathaniel H. Claiborne';<|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 ran as an incumbent leader first in 1818? <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1818';<|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 were the running candidates when Joshua Sands was the incumbent? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Joshua Sands';<|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: What was the result of the election where stephen van rensselaer was the incumbent and the party represented was the adams-clay federalist party? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "party"='Adams-Clay Federalist' AND "incumbent"='Stephen Van Rensselaer';<|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: How many district has a candidate that was first elected on 1811? <|assistant|> SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1811';<|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: In what district was the incumbent Charles A. Wickliffe? <|assistant|> SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Charles A. Wickliffe';<|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: What party did the incumbent Thomas P. Moore belong to? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Thomas P. Moore';<|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 were the candidates in the Kentucky 9 district? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 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" text, "result" text, "candidates" text ); Question: Who were the candidates in the Kentucky 5 district? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 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" text, "result" text, "candidates" text ); Question: Who was the incumbent when the candidate was william drayton (j)? <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='William Drayton (J)';<|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: What party did candidate george mcduffie (j) represent? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "candidates"='George McDuffie (J)';<|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: What party did robert p. letcher represent? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Robert P. Letcher';<|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: What district(s) did henry clay represent? <|assistant|> SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Henry Clay';<|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 were the candidates for election that had a result of a retired jacksonian gain? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "result"='Retired Jacksonian 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" text, "result" text, "candidates" text ); Question: What ended up happening in the district Virginia 22? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 22';<|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: What party won the Virginia 4 district? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 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: How many people won the election in the district of Virginia 4? <|assistant|> SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 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 is the incumbent in the Virginia 6 district? <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 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" text, "result" text, "candidates" text ); Question: What is Samuel Smith's party? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Samuel Smith';<|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: what is Peter Little's party? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Peter Little';<|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: What was the result of Samuel Smith's race? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Samuel Smith';<|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: Name the result for north carolina 9 <|assistant|> SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "district"='North Carolina 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" text, "result" text, "candidates" text ); Question: Name the party for hutchins g. burton <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Hutchins G. Burton';<|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: Name the result for thomas h. hall (dr) 53.0% william clarke (f) 47.0% <|assistant|> SELECT COUNT("result") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Thomas H. Hall (DR) 53.0% William Clarke (F) 47.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" text, "result" text, "candidates" text ); Question: Name the candidates for felix walker <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Felix Walker';<|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 are the candidates when the incumbent is john pegram? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Pegram';<|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 are the candidates for district virginia 12? <|assistant|> SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 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" text, "result" text, "candidates" text ); Question: What is the result when the candidates are alexander smyth (dr) 100% <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Alexander Smyth (DR) 100%';<|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: How many times is the candidates charles f. mercer (f) 100%? <|assistant|> SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Charles F. Mercer (F) 100%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: how many times was the incumbent is john b. yates? <|assistant|> SELECT COUNT("party") FROM "table1_2668347_14" WHERE "incumbent"='John B. Yates';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: when was the first elected when the candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%? <|assistant|> SELECT "first_elected" FROM "table1_2668347_14" WHERE "candidates"='Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: who are the candidates for district new york 10? <|assistant|> SELECT "candidates" FROM "table1_2668347_14" WHERE "district"='New York 10';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: how many times were the candidates thomas h. hubbard (dr) 51.5% simeon ford (f) 48.4%? <|assistant|> SELECT COUNT("party") FROM "table1_2668347_14" WHERE "candidates"='Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: what is the district when the party is federalist and first elected is 1814? <|assistant|> SELECT "district" FROM "table1_2668347_14" WHERE "party"='Federalist' AND "first_elected"='1814';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_17" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Name the candidates for pennsylvania 14 <|assistant|> SELECT "candidates" FROM "table1_2668347_17" WHERE "district"='Pennsylvania 14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_17" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Name the incumbent for jacob spangler (dr) 67.1% jacob hay (f) 32.9% <|assistant|> SELECT "incumbent" FROM "table1_2668347_17" WHERE "candidates"='Jacob Spangler (DR) 67.1% Jacob Hay (F) 32.9%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_17" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Name the most first elected <|assistant|> SELECT MAX("first_elected") FROM "table1_2668347_17";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668347_17" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Name the number of candidates for samuel d. ingham <|assistant|> SELECT COUNT("candidates") FROM "table1_2668347_17" WHERE "incumbent"='Samuel D. Ingham';<|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 district did William A. Burwell (Dr) belong to? <|assistant|> SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='William A. Burwell (DR)';<|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: What was the result in the district represented by Thomas R. Gold? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Thomas R. Gold';<|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 is every incumbent when Kentucky 2 is the district? <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 2';<|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 is first elected when Kentucky 6 is the district? <|assistant|> SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='Kentucky 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" text, "result" text, "candidates" text ); Question: What is every district for incumbent Joseph Desha? <|assistant|> SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Joseph Desha';<|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 experienced a result of lost re-election democratic-republican hold? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Lost re-election Democratic-Republican hold';<|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: How many districts have John C. Calhoun as the incumbent? <|assistant|> SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John C. Calhoun';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668367_7" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Who was the incumbent in the Kentucky 8 district? <|assistant|> SELECT "incumbent" FROM "table1_2668367_7" WHERE "district"='Kentucky 8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668367_7" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: What was the result in the election in the Kentucky 8 district? <|assistant|> SELECT "result" FROM "table1_2668367_7" WHERE "district"='Kentucky 8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668367_7" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: What was the result in the election in the Kentucky 1 district? <|assistant|> SELECT "result" FROM "table1_2668367_7" WHERE "district"='Kentucky 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" text, "result" text, "candidates" text ); Question: What district had an election with incumbent john smilie? <|assistant|> SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Smilie';<|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: How many districts first elected someone in 1808 and had george smith as the incumbent? <|assistant|> SELECT COUNT("district") FROM "united_states_house_of_representatives_e" WHERE "first_elected"='1808' AND "incumbent"='George Smith';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668374_18" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Who was the incumbent in Virginia 3? <|assistant|> SELECT "incumbent" FROM "table1_2668374_18" WHERE "district"='Virginia 3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668374_18" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: What incumbent was a federalist that was first elected in 1803? <|assistant|> SELECT "incumbent" FROM "table1_2668374_18" WHERE "party"='Federalist' AND "first_elected"='1803';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668374_18" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: How many parties were first elected in 1805? <|assistant|> SELECT COUNT("party") FROM "table1_2668374_18" WHERE "first_elected"='1805';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668374_18" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: What district was John Dawson from? <|assistant|> SELECT "district" FROM "table1_2668374_18" WHERE "incumbent"='John Dawson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668374_10" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); Question: Who were the running candidates when Samuel Riker was the incumbent? <|assistant|> SELECT "candidates" FROM "table1_2668374_10" WHERE "incumbent"='Samuel Riker';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668367_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: Who were the candidates in the district where the incumbent was Nathaniel Macon? <|assistant|> SELECT "candidates" FROM "table1_2668367_14" WHERE "incumbent"='Nathaniel Macon';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_2668367_14" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); Question: What party did the incumbent Joseph Pearson belong to? <|assistant|> SELECT "party" FROM "table1_2668367_14" WHERE "incumbent"='Joseph Pearson';<|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: How many incumbents are there in Pennsylvania 5? <|assistant|> SELECT COUNT("incumbent") FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 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" text, "result" text, "candidates" text ); Question: What are the parties listed for Pennsylvania 8? <|assistant|> SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 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: Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%. <|assistant|> SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.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: What was the result for Andrew Gregg? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Andrew Gregg';<|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: What was the result for Pennsylvania 8? <|assistant|> SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "district"='Pennsylvania 8';<|endoftext|>