Your question is Average ETA and Outlier Trips. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Uber's Operations team wants a quick quality check on trip ETA data from the Driver app. Write a SQL query to calculate the overall average ETA and identify trips whose ETA is unusually high.
eta_minutes is not NULL.eta_minutes is greater than 2 times the overall average ETAavg_eta_minutes and outlier_trip_count.Because this is an easy question, use a single table only.
| Column | Type | Description |
|---|---|---|
| trip_idPK | INT | Unique trip identifier |
| city_name | VARCHAR(50) | City where the trip was requested |
| rider_surface | VARCHAR(50) | Uber surface or product where ETA was displayed |
| eta_minutes | DECIMAL(5,2) | Estimated time of arrival in minutes |
| event_date | DATE | Date of the ETA event |