Write a SQL query to retrieve the top 10 candidates based on performance metrics.
Use the provided candidate and performance metric data. Calculate each candidate's average non-null performance score and include only candidates with at least one score.
candidate_id, candidate_name, average_score, and metric_count.| Column | Type | Description |
|---|---|---|
| candidate_idPK | INT | Unique candidate identifier |
| candidate_name | VARCHAR(100) | Candidate's full name |
| is_active | BOOLEAN | Whether the candidate is currently active |
| Column | Type | Description |
|---|---|---|
| metric_idPK | INT | Unique performance metric identifier |
| candidate_id | INT | Candidate associated with the metric |
| metric_name | VARCHAR(80) | Name of the measured performance dimension |
| score | DECIMAL(5,2) | Performance score, where higher values indicate stronger performance |