Clear Operations needs a weekly view of performance across Clear locations. Write a PostgreSQL query that reports completed transaction volume, average customer wait time, and the week-over-week change in completed transactions for each location.
completed.NULL when no prior week exists.| Column | Type | Description |
|---|---|---|
| location_idPK | INT | Primary key for the Clear location |
| location_name | VARCHAR(100) | Name of the Clear location |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Primary key for the transaction |
| location_id | INT | Location associated with the transaction |
| status | VARCHAR(20) | Transaction processing status |
| completed_at | TIMESTAMPTZ | Timestamp when the transaction completed |
| wait_minutes | INT | Customer wait time in minutes |