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.
Sampla aschuir a bhfuiltear ag súil leis
Seo é an chuma a bheadh ar fhreagra ceart — tá a líon rónna féin aige, ní gá dó na táblaí scéime a mheaitseáil.
| city | total | driver_id |
|---|---|---|
| Kazan | 400 | 3 |
| Moscow | 800 | 1 |
Logáil isteach chun stair na n-aighneachtaí a fheiceáil
Logáil isteachLogáil isteach chun an Meantóir IS a úsáid
Logáil isteach