#1115

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.

Примерен очакван изход

Така изглежда правилният отговор — броят редове е негов собствен, не е задължително да съвпада с таблиците в схемата.

citytotaldriver_id
Kazan4003
Moscow8001

Резултатът от заявката ти ще се покаже тук