Given a table of customer deliveries, write a query to identify any delivery drivers who have completed more than a specific threshold of deliveries in a single week at Carvana.
Assume the threshold is supplied as PostgreSQL parameter \$1. Include only completed deliveries with a non-null delivery timestamp.
driver_id, driver_name, week_start, and delivery_count.week_start, then driver_id.| Column | Type | Description |
|---|---|---|
| delivery_idPK | INT | Unique delivery identifier |
| driver_id | INT | Driver assigned to the delivery |
| customer_id | INT | Customer associated with the delivery |
| delivered_at | TIMESTAMP | Timestamp when the delivery was completed |
| delivery_status | VARCHAR(20) | Delivery status |
| Column | Type | Description |
|---|---|---|
| driver_idPK | INT | Unique driver identifier |
| driver_name | VARCHAR(100) | Driver's full name |