EASYVerified Real Interview• Operations Data Analyst

High-Mileage Ride Cancellations

Uber Operations team is analyzing long-distance driver cancellations to reduce passenger churn.

Write a SQL query to find all rides with status = 'cancelled_by_driver' that had an estimated distance of 15.0 miles or greater. Return the trip_id, city_id, distance_miles, and fare_estimate. Order by distance_miles descending.

Tables:

  • trips (trip_id INT, city_id INT, status VARCHAR, distance_miles DECIMAL, fare_estimate DECIMAL)

Execution Sandbox:

Your query executes inside an isolated in-memory PostgreSQL engine (PGlite WebAssembly). You have full access to standard PostgreSQL aggregations, window functions, and CTEs.

Standard SQL (ANSI)|Ln 1, Col 1
⌘↵ Run Query
Ready to execute. Press Run (⌘+Enter)
Write your query and click “Run” or press ⌘+Enter to inspect output.