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.
Ukázka očekávaného výstupu
Takto vypadá správná odpověď — počet řádků je její vlastní, nemusí odpovídat tabulkám schématu.
| trip_id | rider_id |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 4 | 3 |
Přihlaste se, abyste viděli historii odevzdání
Přihlásit sePřihlaste se, abyste mohli použít AI mentora
Přihlásit se