Top driver in each city
A ride-hailing service rewards the best driver in each city. For each city, find the driver with the highest total fare across completed trips. Ignore trips with no assigned driver. Return city, driver_id and the revenue total, ordered by city, then driver id.
Vzorec pričakovanega izhoda
Tako izgleda pravilen odgovor — ima svoje število vrstic in se ni treba ujemati s tabelami sheme.
| city | total | driver_id |
|---|---|---|
| Kazan | 400 | 3 |
| Moscow | 800 | 1 |
Prijavite se za ogled zgodovine oddaj
PrijavaPrijavite se za uporabo mentorja UI
Prijava