Why Turing and client readiness?
Using the provided Turing candidate, client, and readiness-check records, write a PostgreSQL query that summarizes readiness for active candidates. Include candidates even when they have no checks or no matching active client.
candidate_id, candidate_name, client_name, completed_checks, avg_score, and readiness_statusready only with at least two completed checks, no failed checks, and an average score meeting the client's threshold| Column | Type | Description |
|---|---|---|
| candidate_idPK | INT | Unique Turing candidate identifier |
| candidate_name | VARCHAR(100) | Candidate display name |
| client_id | INT | Assigned client identifier |
| candidate_status | VARCHAR(20) | Current candidate status |
| start_date | DATE | Candidate engagement start date |
| Column | Type | Description |
|---|---|---|
| client_idPK | INT | Unique client identifier |
| client_name | VARCHAR(100) | Client display name |
| readiness_threshold | DECIMAL(5,2) | Minimum average score required for readiness |
| is_active | BOOLEAN | Whether the client is currently active |
| Column | Type | Description |
|---|---|---|
| check_idPK | INT | Unique readiness-check identifier |
| candidate_id | INT | Candidate evaluated by the check |
| check_type | VARCHAR(50) | Type of readiness check |
| check_status | VARCHAR(20) | Check outcome |
| score | DECIMAL(5,2) | Numeric check score |
| completed_at | DATE | Date the check was completed |