Write a SQL query to track weekly project throughput by team at Condé Nast, including completed tasks, average cycle time, and week-over-week change.
Use the provided teams and tasks data. Include completed tasks only, calculate cycle time from task start to completion, and compare each team's weekly completed-task count with its previous reported week.
team_name, week_start, completed_tasks, avg_cycle_time_hours, and wow_change_pct.team_name, then week_start ascending. Return NULL when a prior week is unavailable or cycle time cannot be calculated.| Column | Type | Description |
|---|---|---|
| team_idPK | INT | Unique team identifier |
| team_name | VARCHAR(100) | Condé Nast team name |
| Column | Type | Description |
|---|---|---|
| task_idPK | INT | Unique task identifier |
| team_id | INT | Team assigned to the task |
| status | VARCHAR(30) | Current task status |
| started_at | TIMESTAMP | Timestamp when work began |
| completed_at | TIMESTAMP | Timestamp when the task was completed |