Your question is Distinct Companies Applied To. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
FNZ's candidate reporting workflow needs an overview of application reach. Write a PostgreSQL query that reports how many distinct companies each candidate has applied to.
NULL from the distinct count.candidate_id ascending to make ties deterministic.| Column | Type | Description |
|---|---|---|
| candidate_idPK | INT | Unique candidate identifier |
| candidate_name | VARCHAR(100) | Candidate's full name |
| VARCHAR(255) | Candidate email address |
| Column | Type | Description |
|---|---|---|
| report_idPK | INT | Unique application report identifier |
| candidate_id | INT | Candidate associated with the report |
| company_name | VARCHAR(150) | Company applied to, when known |