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.
Przykładowy oczekiwany wynik
Tak wygląda poprawna odpowiedź — liczba jej wierszy jest swoista i nie musi odpowiadać tabelom ze schematu.
| trip_id | rider_id |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 4 | 3 |
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj się