For a new consumer: an analyst, a team lead, a new member of Finance. Read this once, run the 3 queries, and you have the numbers of the Monday trading pack: net revenue, orders and margin by month, market and category.
One row per order line of an order that was not cancelled, with its day, customer and product beside it. 12,418,906 rows, from 2022-01-01 to 2026-08-31. It lives in the warehouse as gold_marts.obt_order_lines, and it is rebuilt by every run that succeeds, daily from 05:30 UTC.
Read-only, and never while the daily run is writing. In Python:
import duckdb con = duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True) con.sql("SELECT count(*) FROM gold_marts.obt_order_lines").show()
If it says the file is locked, a run is writing. Wait until the run has finished, about 12 min after 05:30 UTC. More in knowledge/connections.md.
If your numbers differ from these, the table was rebuilt since this page was written, or your filter differs. Ask before you report.
SELECT order_month, sum(net_eur) AS net_revenue_eur, count(DISTINCT order_id) AS orders, round(sum(net_eur) / nullif(count(DISTINCT order_id), 0), 2) AS average_order_value_eur FROM gold_marts.obt_order_lines WHERE order_month >= '2026-01' GROUP BY order_month ORDER BY order_month;
SELECT ship_country, count(DISTINCT order_id) AS orders, sum(net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY ship_country ORDER BY net_revenue_eur DESC;
SELECT order_year, sum(net_eur) AS net_revenue_eur, count(DISTINCT order_id) AS orders FROM gold_marts.obt_order_lines WHERE month(ordered_on) = 8 AND order_year IN (2025, 2026) GROUP BY order_year ORDER BY order_year;
SELECT category, sum(net_eur) AS net_revenue_eur, sum(standard_cost_eur) AS standard_cost_eur, sum(net_eur) - sum(standard_cost_eur) AS margin_eur, round((sum(net_eur) - sum(standard_cost_eur)) / nullif(sum(net_eur), 0), 4) AS margin_pct FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY category ORDER BY margin_eur DESC;
SELECT customer_type, count(DISTINCT order_id) AS orders, sum(net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY customer_type ORDER BY customer_type;
SELECT sku, product_name, brand, sum(quantity) AS units, sum(net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY sku, product_name, brand ORDER BY net_revenue_eur DESC LIMIT 10;
SELECT channel, sum(gross_eur) AS gross_merchandise_eur, sum(discount_eur) AS discount_eur, round(sum(discount_eur) / nullif(sum(gross_eur), 0), 4) AS weighted_discount FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY channel ORDER BY gross_merchandise_eur DESC;
SELECT campaign_id, count(DISTINCT order_id) AS orders, sum(discount_eur) AS discount_eur, sum(net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' AND campaign_id IS NOT NULL GROUP BY campaign_id ORDER BY orders DESC;
SELECT count(DISTINCT customer_id) FILTER (WHERE customer_id <> 'unknown') AS registered_customers, round(count(DISTINCT order_id) FILTER (WHERE customer_type = 'guest') / nullif(count(DISTINCT order_id), 0), 4) AS guest_share_of_orders FROM gold_marts.obt_order_lines WHERE order_month = '2026-08';
SELECT line_id, ordered_on, sku, product_name, quantity, gross_eur, discount_eur, net_eur FROM gold_marts.obt_order_lines WHERE order_id = 'SO372035' ORDER BY line_id;
From release 1.1.0 on 2026-10-07, gold_marts.obt_order_lines no longer carries city and postal_code. The one big table is read by 5 roles, and personal detail belongs where few people read it. None of the queries of 2026-08 read them. A query outside the log keeps working when it joins gold_marts.dim_customers, as below. Nothing else in the table changes.
-- Before, until 1.0.0 SELECT postal_code, sum(net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines WHERE order_month = '2026-08' GROUP BY postal_code; -- After, from 1.1.0: the postal code comes from the customer dimension SELECT customers.postal_code, sum(lines.net_eur) AS net_revenue_eur FROM gold_marts.obt_order_lines AS lines JOIN gold_marts.dim_customers AS customers ON customers.customer_id = lines.customer_id WHERE lines.order_month = '2026-08' GROUP BY customers.postal_code;
SELECT count(*) - count(DISTINCT line_id) FROM gold_marts.obt_order_lines
SELECT count(*) FROM gold_marts.obt_order_lines JOIN silver_core.orders USING (order_id) WHERE is_cancelled
SELECT round(abs( (SELECT sum(net_eur) FROM gold_marts.obt_order_lines) - (SELECT sum(net_eur) FROM gold_marts.fact_order_lines WHERE NOT is_cancelled)), 2)
SELECT count(*) FROM gold_marts.obt_order_lines WHERE standard_cost_eur IS NULL
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)
duckdb.connect("data/warehouse/newvolt.duckdb", read_only=True)