human
Schema:
election (Election_ID, Representative_ID, Date, Votes, Vote_Percent, Seats, Place)
representative (Representative_ID, Name, State, Party, Lifespan)
Please answer with SQL.
assistant
Sure, I understand.
human
Which states have two or more representatives?
assistant
SELECT State FROM representative GROUP BY State HAVING COUNT( * ) > = 2;
human
What are the names of the representatives from those states?
assistant
SELECT name FROM representative WHERE state IN ( SELECT state FROM representative GROUP BY State HAVING COUNT( * ) > = 2 ) ;