Loading the editor…
Show parcels that have left the warehouse and have not been delivered or cancelled.
The control tower calls destination cities when a shipment stays in transit. Delivered and cancelled freight is noise.
Return id, destination_city, and shipped_on for shipments with status in_transit. Sort by shipped_on.
| id | name | city |
|---|---|---|
| 1 | Berlin Hub | Berlin |
| 2 | Lagos DC | Lagos |
| 3 | Rotterdam Port | Rotterdam |
| id | warehouse_id | destination_city | status | shipped_on | delivered_on |
|---|---|---|---|---|---|
| 1 | 1 | Paris | delivered | 2025-01-04 | 2025-01-06 |
| 2 | 1 | Warsaw | in_transit | 2025-02-11 | NULL |
| 3 | 2 | Accra | in_transit | 2025-02-12 | NULL |
Ctrl or Cmd + Enter runs the query. The database resets on every run.
Run the query to see rows from the sample database.
Next exercise: Order line totals
Related: Active shipments per warehouse, Products with unknown stock