mediumDHL · date-timePro
Flag shipments that breached their SLA
Each shipment has an agreed delivery window (sla_days). For every shipment, compute the actual number of days it took to deliver, and flag it 'Late' if that exceeds the SLA, otherwise 'On time'.
Return tracking_no, actual_days, and status.
Schema
▸shipments
| id | INT |
| tracking_no | TEXT |
| dispatched_at | TIMESTAMP |
| delivered_at | TIMESTAMP |
| sla_days | INT |
Pro
The example input, expected output, and walkthrough for this question unlock with a Pro plan.
Pro
This is a Pro question
Premium practice questions unlock with a Pro plan. The full solution, expected output, and grading are available to Pro members.