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 |