Operations and logistics metrics: formulas and SQL

Metrics for delivery, cost, capacity and quality. Missing timestamps and partial periods are the most common reasons these numbers are wrong.