Back to problems

Election Exit Poll by State Report (Top-3 states per candidate with ties)

SQL · Point72 · Hard

You are given two tables that record election results: candidates id (SMALLINT): unique identifier for a candidate first_name (VARCHAR(64)) last_name (VARCHAR(64)) results candidate_id (SMALLINT): references candidates.id state (VARCHAR(19)): name of a US state; each row corresponds to a single vote cast in that state Write a SQL query that builds an exit-poll summary. For every candidate, the report must show the three highest distinct vote-count levels (the 1st, 2nd, and…

Checking your access…