Write a SQL query to analyze operational performance by team, including joins across relevant tables and aggregations by week.
Use the provided operational data and limit results to January 2025. Include operational records assigned to a known team.
team_name, week_start, total_cases, completed_cases, avg_resolution_hours, sla_rate_pct, and performance_rank.| Column | Type | Description |
|---|---|---|
| team_idPK | INT | Unique team identifier |
| team_name | VARCHAR(100) | Operational team name |
| region | VARCHAR(50) | Primary operating region |
| Column | Type | Description |
|---|---|---|
| agent_idPK | INT | Unique agent identifier |
| agent_name | VARCHAR(100) | Agent display name |
| team_id | INT | Team assignment |
| employment_status | VARCHAR(30) | Current employment status |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique operational event identifier |
| agent_id | INT | Agent assigned to the event |
| completed_at | TIMESTAMP | Event completion or status timestamp |
| status | VARCHAR(30) | Operational event status |
| resolution_hours | DECIMAL(8,2) | Hours spent resolving the event |
| sla_hours | DECIMAL(8,2) | Target resolution time in hours |