Ride-hailing marketplace
Riders, drivers and every trip request in four cities, April to June 2025, including cancellations and requests no driver took.
cities
Cities we operate in. Key: city_id. 4 rows in the larger version, 3 in the smaller.
| city_id | int | Unique id. |
| city_name | text | Name. |
| country | text | Two-letter country code. |
drivers
One row per driver. Key: driver_id. 60 rows in the larger version, 24 in the smaller.
| driver_id | int | Unique id. |
| full_name | text | Name. |
| city_id | int | Home city. |
| joined_on | date | First day driving. |
| vehicle_type | text | standard, xl or electric. |
riders
One row per rider. Key: rider_id. 220 rows in the larger version, 80 in the smaller.
| rider_id | int | Unique id. |
| full_name | text | Name. |
| signed_up_on | date | Sign-up day. |
trips
One row per ride request. Key: trip_id. 1,800 rows in the larger version, 600 in the smaller.
| trip_id | int | Unique id. |
| rider_id | int | Who asked. |
| driver_id | int, nullable | Driver who accepted. NULL when nobody did. |
| city_id | int | Where. |
| requested_at | timestamp | Request time (UTC). |
| picked_up_at | timestamp, nullable | Pickup time. NULL if never picked up. |
| dropped_off_at | timestamp, nullable | Drop-off time. NULL unless completed. |
| status | text | completed, rider_cancelled, driver_cancelled or no_driver. |
| fare | numeric(10,2), nullable | Fare in local currency units. NULL unless completed. |
| distance_km | numeric(6,2), nullable | Trip distance. NULL unless completed. |
| rider_rating | int, nullable | Rider's rating of the driver, 1 to 5. NULL if not rated. |
Questions on this database
- Five-star trips per driver in June, idle drivers includedThe community team wants to thank drivers for great service and also see who got no recognition. For June 2025, count each driver's five-star trips.
- Average rating per city, weighted by tripsThe quality team publishes one rider rating per city. A rider may skip the rating, so rider_rating is NULL on many completed trips.
- Completed trips by driver tenure bandThe driver success team wants to know whether newer drivers earn less per trip. Use completed trips only.
- Fare per kilometre by city and vehicle typeThe pricing team compares how much a kilometre earns in each city for each kind of vehicle. Use completed trips only.
- Riders whose first and last trips are 71 days apartThe lifecycle team wants to study riders who stayed around. For every rider, look at their completed trips and the calendar date of requested_at.
- Trips from brand-new riders, by cityThe city managers want to know how much of each city's volume comes from new riders.
- Completed trips for every city and vehicle typeOperations is building a grid for a dashboard: one row for every combination of a city and a vehicle type, so that empty cells are visible.
- Each December rider's most recent completed tripRider care is writing to everyone who signed up in December 2024 (riders.signed_up_on from 2024-12-01 to 2024-12-31 inclusive) and wants to mention their...
- Driver rating leaderboard, unrated drivers lastThe operations team of the pilot city (the city with city_id 1) wants a leaderboard of its drivers: every driver whose home city (drivers.city_id) is 1.
- The third longest completed trip in each cityOperations is reviewing long-distance trips and wants the third longest completed trip in every city, as a row position: sort the city's completed trips...
- Top three drivers in each city, ties at third place keptThe driver community team gives a monthly shout-out to the busiest drivers in each city.
- Running earnings for two driversThe driver-support team is looking at how earnings build up for two long-serving drivers, driver 5 and driver 13.
- Time until a rider requests again after cancellingThe rides team wants to know whether riders who cancel try again soon.
- Riders who came back after a driver cancelledThe trust team wants to thank riders who stayed loyal after a driver let them down.
- Cancellation rate by cityCity managers want to know how often a ride request ends in a cancellation.
- Driver cancellations among accepted ridesDriver operations wants to know how often a driver backs out after accepting a request.
- Average fare for short and long tripsPricing wants to compare what short and long trips earn in each city. Only completed trips count (status = 'completed'). A short trip has distance_km under 5.
- Rider cancellations per completed trip, by cityCity managers want to know how many riders cancel for every trip that actually happens.
- Requests and completion rate by time of dayThe marketplace team splits the day into four parts using the hour of requested_at (UTC).
- Average pickup wait and trip length in minutesOperations tracks how long riders wait and how long trips take.
- May trip requests by city, last day includedCity managers want the May 2025 request count for every city. Count the trips requested from 2025-05-01 00:00:00 through the end of 2025-05-31.
- Total fare by city, including cities with no completed tripsThe finance team needs the money taken in each city. fare is NULL on any request that was not completed.
- Average fare per request and per completed tripThe city managers compare two averages. fare is only filled in for completed trips, and is NULL for cancelled requests and requests no driver took.
- Riders who got a different driver than last timeMarketplace ops wants to know how often a rider's outcome changes from one request to the next.
- Trips between a rider and a driver they already knowThe marketplace team studies "regular pairings": the same rider riding again and again with the same driver. Look only at completed trips.
- How many drivers in the same city rate higherDriver operations wants each driver's standing in their home city: how many other drivers there have a better average rating.
- New riders with no completed trip in their first 14 daysThe rider growth team wants to nudge new riders who did not manage a ride in their first two weeks, and to see whether they at least tried.
- Biggest drop-off step in the ride funnelOperations wants to know where each city loses the most ride requests.
- Longest run of consecutive driver cancellationsThe marketplace team wants to find drivers who cancel repeatedly in a row.
- 90th percentile trip length by cityOperations plans driver shifts around the long trips, not the typical ones, so they track the 90th percentile of trip length.
- Names shared by several drivers and ridersThe support team searches by name, and shared names cause mix-ups between drivers and riders. Treat every row in drivers and every row in riders as one account.