Procurement & Sourcing Analytics · Mission 9 of 30Easy

Average lead time

AVG with date arithmetic

The Brief

Maya ChenProcurement Directorprocurement-ops

What's the average lead time (po_date to gr_date in days) per supplier? Show supplier_name and avg_lead_days. Sort descending.

You'll practice

AVGDate arithmetic

Tables & columns available

fact_purchase_ordersfact15 columns
ColumnTypeKey
po_idINTPK
supplier_idINTFK → dim_suppliers
category_idINTFK → dim_categories
contract_idINTFK → dim_contracts
req_dateTEXT
po_dateTEXT
ack_dateTEXT
asn_dateTEXT
gr_dateTEXT
invoice_dateTEXT
qty_orderedINT
qty_receivedINT
unit_priceREAL
contracted_priceREAL
statusTEXT
dim_suppliersdim8 columns
ColumnTypeKey
supplier_idINTPK
supplier_nameTEXT
countryTEXT
tierINT
category_focusTEXT
diversity_certifiedINT
payment_terms_daysINT
is_preferredINT

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Lead time is the gap between two date columns — date arithmetic returns days.

Hint 2

JOIN POs to suppliers.

Hint 3

Sort descending.