How to calculate Supplier Lead Time
Supplier lead time is the time between placing a purchase order and receiving the goods.
Formula
Lead time = goods received date − purchase order dateSQL query
This example assumes: purchase_orders(id, supplier_id, ordered_at, received_at, promised_at). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.
SELECT supplier_id,
AVG(received_at::date - ordered_at::date) AS avg_lead_days,
AVG(received_at::date - promised_at::date) AS avg_days_vs_promise
FROM purchase_orders
WHERE received_at IS NOT NULL
GROUP BY supplier_id
ORDER BY avg_lead_days DESC;Common mistakes that make Supplier Lead Time wrong
- Partial receipts: use the date the full quantity arrived, or say you use the first receipt.
- Variability matters as much as the average for safety stock.
- Open orders are excluded, which hides the worst delays.
Ask for Supplier Lead Time in plain English
Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.
- Which suppliers have the longest average lead time?
- Which suppliers deliver later than promised most often?