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
please show me the names of all of the representatives
assistant
SELECT Name FROM representative;
human
Now show narrow down the list to just those who have not been involved in an election
assistant
SELECT Name FROM representative WHERE Representative_ID NOT IN ( SELECT Representative_ID FROM election );
human
now show those representatives and what party they are a member of
assistant
SELECT Name , party FROM representative WHERE Representative_ID NOT IN ( SELECT Representative_ID FROM election ) ;