your_project.sm_transformed_v2.obt_ordersyour_project.sm_transformed_v2.rpt_executive_summary_daily- Many SQL Query Library recipes
Key fields (order-level)
These are the canonical order-level fields inobt_orders:
order_gross_revenue: line-item revenue before discounts, excluding gift card purchasesorder_discounts: discounts applied (see sign convention below)order_refunds: refunds applied (see sign convention below)order_net_revenue: gross revenue after discounts and refundsorder_net_revenue_before_refunds: gross revenue after discounts, before refundsorder_total_revenue: net revenue plus net shipping, net taxes, and net shipping taxes
Date basis
For order-level analysis, useorder_processed_at_local_datetime as the default order date in the brand’s reporting timezone.
Daily transaction/report tables can include later adjustments on the adjustment date. For example, refund-only transaction rows may appear on the refund date while the original placed-order row uses the order processed date. When reconciling two reports, match both the revenue field and the date basis.
Important sign convention (discounts + refunds)
In most SourceMedium tables, discounts and refunds are stored as negative numbers (or0).
That means net revenue is additive:
If you see positive refunds in your data, treat it as a data-quality edge case (some platforms can emit adjustments that violate the expected sign conventions).
Why revenue may not match another report
Most revenue discrepancies come from comparing two reports that use different definitions or grains. For the broader cross-tool checklist, see Why would external reports not match the SourceMedium dashboard?.| Difference | What to compare |
|---|---|
| Gross vs net vs total revenue | Confirm whether discounts, refunds, shipping, taxes, and shipping taxes are included. |
| Order date vs adjustment date | Confirm whether refunds or other adjustments are reported on the original order date or the later adjustment date. |
| Order-level vs line-level grain | Confirm whether the report sums one row per order, one row per line item, or one row per transaction. |
| Valid order filters | Confirm whether test orders, exchanges, returns, samples, or excluded orders are included. |
| Channel or customer filters | Confirm whether both reports use the same channel, customer type, subscription, product, and store filters. |
If two reports use the same date range but different revenue fields, they can both be correct. Start by matching the field definition before treating the difference as a data issue.

