Founding rate: RM5 off Basic, forever — applied automatically. See pricing

Menu
GrabBasic

Grab — Driver Supply Gap

Grab's regional ops team wants to know which city is most under-supplied with drivers, hour by hour, on 12 Jan 2026. You have two tables — ride requests and driver shifts — and no pre-joined view. Five sequential steps: count demand, count supply, combine them into a stretch ratio, find each city's worst hour with a window function, then name the single city to staff first.

Schema

grab_ride_requests
request_idSERIAL
city_idTEXT
requested_atTIMESTAMP
grab_driver_shifts
shift_idSERIAL
driver_idINT
city_idTEXT
shift_startTIMESTAMP
shift_endTIMESTAMP

5 steps

  1. 1Count ride requests per city per hour
  2. 2Count online drivers per city per hour
  3. 3Compute the demand-to-supply ratio per city-hour
  4. 4Find each city's peak-stretch hour with a window function
  5. 5Name the one city ops should staff first

Basic

This is a Basic take-home

Multi-step case rounds — several questions on one shared dataset — unlock with a Basic plan.

See Basic plans

RM 25/mo · cancel anytime

Company names are trademarks of their respective owners, used here only to describe practice material. mahir_data is not affiliated with, endorsed by, or sponsored by any company named on this site. Terms.