Complex~36min
The On-Time Rate That Ignores the Redefinition
The reported on-time delivery rate jumps from 65% to 95% at month 7 and stays healthy afterward — looks like a big operational win. It's entirely because a policy change added a 24-hour grace window to "on-time" starting month 7. Measured against the original strict definition, the true on-time rate keeps falling every month, from 90% down to 35% — the redefinition masked a steadily worsening trend, it didn't fix anything.
Tables you'll query
shipmentspolicy_changes
What you'll learn
CTEs (WITH clause)Window FunctionsDate & Time Functions