MODULE 06 — PROJECT METRIC CONTRACT
Grain: one verified order per order_id. Source has 44 unique orders.
Fields: order_id (text), order_date (ISO YYYY-MM-DD), channel (web/store), status
(completed/returned/cancelled), order_value_eur (non-negative EUR major units),
delivery_days (non-negative integer; blank means not supplied).
Source is identical to Module 4. No new transactions or teaching fields added.
Reporting filters: April [2026-04-01,2026-05-01); May [2026-05-01,2026-06-01).
Date interpretation uses the supplied order date, not delivery or return date.

Completed value: sum order_value_eur for selected date/channel and completed status.
Completed count: count eligible unique orders. Check key uniqueness before use.
AOV: completed value / completed count. Empty denominator -> unavailable.
Median value: median eligible order values (diagnostic, not a substitute for AOV).
Delivery measured count: eligible completed orders with a known numeric duration.
Missing count: eligible completed orders minus measured count.
Coverage: measured count / eligible completed count. Empty population -> unavailable.
Observed delivery mean: sum known durations / measured count. No measurements ->
unavailable. Do not fill missing with zero; retain an actual numeric zero.
Excluded status count: selected date/channel records with non-completed status.

Value change: (May value - April value) / April value × 100 using same channel.
April or combined window: comparison unavailable because prior source is absent.
Zero prior value: relative change unavailable, not infinity, 0% or 100%.
Channel AOV: channel completed value / channel completed count.
Overall AOV uses order-count weights, not equal weights or revenue shares.
Share difference: 90%-10%=80 percentage points; not 80% relative growth.

Known empty selection: additive value/count zero, averages/rates unavailable.
The Empty practice selection control is synthetic, not a real source channel.
A missing period is a different case: do not assert zero historical activity.
The HTML embeds a static source; changing a neighbouring CSV does not refresh it.
Fixture edition identifies learning material, not last successful live ingestion.
No spend, costs, customer IDs, experiment or seasonal history supplied.
No profit, ROI, customer conversion, stable forecast or causal effect established.

CAPSTONE SQL
raw_orders preserves text and blanks, including duplicate records. orders is the
separate verified reference. SQL monetary values use REAL EUR for this small
integer-value teaching fixture, not a production accounting implementation.
P1/P2 inspect source; P3/P4 calculate monthly/channel metrics; P5 names returned
shares; P6 LAG is previous observed period, requiring calendar checks on new data;
P7 uses stated bins; P8 explicitly excludes A020 only in a named scenario.
