mahir_data
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
idINT
tracking_noTEXT
dispatched_atTIMESTAMP
delivered_atTIMESTAMP
sla_daysINT

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.

See Pro plans