Database: election_representative

Question: What are the minimum and maximum vote percents of elections?
SQL: SELECT min(Vote_Percent) ,  max(Vote_Percent) FROM election

Question: What are the life spans of representatives from New York state or Indiana state?
SQL: SELECT Lifespan FROM representative WHERE State  =  "New York" OR State  =  "Indiana"

Question: What are the names of representatives with more than 10000 votes in election?
SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE Votes  >  10000

Question: What are the names of representatives in descending order of votes?
SQL: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes DESC

Question: What is the party of the representative that has the smallest number of votes.
SQL: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes ASC LIMIT 1

Question: What are the lifespans of representatives in descending order of vote percent?
SQL: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY Vote_Percent DESC

Question: What is the average number of votes of representatives from party "Republican"?
SQL: SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE T2.Party  =  "Republican"

Question: What is the party that has the largest number of representatives?
SQL: SELECT Party ,  COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1

Question: What parties have at least three representatives?
SQL: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*)  >=  3

Question: What states have at least two representatives?
SQL: SELECT State FROM representative GROUP BY State HAVING COUNT(*)  >=  2

Question: List the names of representatives that have not participated in elections listed here.
SQL: SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)