Each rider's first trip
For a welcome campaign we need each rider's first trip. For every rider, find the earliest trip by start time; on a tie, take the trip with the smaller id. Return rider_id and trip_id, ordered by rider.
Vzorec pričakovanega izhoda
Tako izgleda pravilen odgovor — ima svoje število vrstic in se ni treba ujemati s tabelami sheme.
| trip_id | rider_id |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 4 | 3 |
Prijavite se za ogled zgodovine oddaj
PrijavaPrijavite se za uporabo mentorja UI
Prijava