Write a query to identify drivers who have completed more than 50 trips in their first week at Uber Drivers, joining driver onboarding tables with trip dispatch logs.
Use the onboarding date as day one and count only completed trips during the following seven calendar days. Return qualifying drivers in descending trip-count order.
driver_id, onboarding_date, and first_week_completed_trips.driver_id ascending.| Column | Type | Description |
|---|---|---|
| driver_idPK | INT | Unique Uber Drivers driver identifier |
| onboarding_date | DATE | Date the driver completed onboarding |
| Column | Type | Description |
|---|---|---|
| log_idPK | INT | Unique dispatch log identifier |
| driver_id | INT | Driver associated with the dispatch records |
| dispatch_date | DATE | Date of the dispatch activity |
| trip_status | VARCHAR(20) | Status of the trips represented by the log |
| completed_trip_count | INT | Number of completed trips represented by the log |