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.
Esempio di output atteso
Ecco come appare una risposta corretta — il suo numero di righe è a sé stante, non deve corrispondere alle tabelle dello schema.
| trip_id | rider_id |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 4 | 3 |
Accedi per vedere la cronologia degli invii
AccediAccedi per usare l'AI Mentor
Accedi