Agentic AnalyticsStart with one decision
OKURKA MARKET · FICTIONAL REFERENCE ENGAGEMENT

Should Okurka deepen its local small-producer assortment?

The carried local-small range leads total sales; incremental demand is unproven.

Run a controlled store-and-SKU holdout before expanding the local-small range. Total segment sales are confounded by assortment breadth, and shelf availability remains the execution constraint.

SIX GOVERNED METRICSFIVE INDEPENDENT MODEL GRAINSTWO REAL COMPILERSFORBIDDEN GRAINS REFUSED BEFORE SQL
THE BUSINESS ANSWER

Total sales earn a controlled test, not an expansion claim.

The carried local-small range leads total net and comparable sales, but it also has the broadest product and store exposure. The generator cannot estimate demand for products a store does not carry. Test matched stores and SKUs before expansion, with shelf availability as the operational gate.

Exposure check: Imported partner · 3 products · 22 store-product slots; Local · regional · 11 products · 76 store-product slots; Local · small producer · 22 products · 182 store-product slots.

DECISION FIGURE · TOTAL SALESNet and comparable sales by product segmentComparable Sales includes stores open on the sale date and the aligned date 364 days earlier.
Net SalesComparable Sales

Local · small producer

NetCZK 3,499,105
CompCZK 3,169,025

Local · regional

NetCZK 1,139,243
CompCZK 1,045,219

Imported partner

NetCZK 526,056
CompCZK 506,056
DECISION FIGURE · ECONOMICS + EXECUTIONWeighted margin and time-weighted shelf availabilityAvailability = available shelf minutes ÷ eligible shelf minutes.

Local · small producer

Gross Margin31.6%
Availability88.6%

Local · regional

Gross Margin32.7%
Availability91.4%

Imported partner

Gross Margin27.8%
Availability94.2%
DECISION FIGURE · CHANNEL CONTEXTBasket value and modeled attributed delivery revenueAttribution is a deterministic single-touch converting-session-batch model, not an observed journey.

Average Basket Value

deliveryCZK 89.29
storeCZK 101.57

Attributed Revenue

emailCZK 183,546
organic searchCZK 223,367
paid socialCZK 244,311
partnerCZK 141,382
THE CONTRACT, NOT A METRIC DUMP

The workbook decides which questions are valid.

The supplied spreadsheet contains six bilingual metric requirements and their permitted dimensions. It is not a source of sales, margin, availability, basket, or attribution observations.

MetricDefinitionAllowed dimensions
Net SalesČisté výnosyGross merchandise value less discounts and VAT.
TimeSales channelStoreRegionProductProduct segmentCustomer segment
Comparable SalesSrovnatelné výnosyNet sales from stores open on the sale date and on the aligned date 364 days earlier.
TimeSales channelStoreRegionProductProduct segment
Gross MarginHrubá maržeOne hundred times summed net sales less cost divided by summed net sales; never an average of row percentages.
TimeSales channelStoreRegionProductProduct segmentCustomer segment
Attributed RevenueAtribuovaný výnosDelivery-order net sales credited once to its eligible non-direct converting session batch under a single-touch campaign model.
TimeMarketing channelCampaignProductProduct segment
Average Basket ValueHodnota nákupního košíkuWhole-basket net sales divided by distinct transactions at the allowed query grain.
TimeSales channelStoreRegionCustomer segment
In-store AvailabilityDostupnostAvailable shelf minutes divided by eligible shelf minutes during the modeled 12-hour trading day.
TimeStoreRegionProductProduct segment

Average Basket Value intentionally omits Product and Product Segment. The runtime rejects that combination before either compiler sees it.

RAW INPUT → GENERATED SQL

Every boundary leaves evidence.

The visible trace separates a requirements file, synthetic generation, physical warehouse rows, dbt models, semantic-engine requests, compiled SQL, and execution receipts. No stage is relabelled as another.

  1. Workbook requirements

    Sheet1!A2:M8 · SHA-256 009bb2b60aea03a254e9aeae09da7aec65ccdd1aa004064e1dabfca8aa5b8618

  2. Misata surrogate relationships

    v0.9.6.7 · seed 2407 · integer keys and foreign keys only

  3. Deterministic operating kernel

    Curated-label locale cs_CZ · 1,482,018 POS lines · 148,835 inventory observations

  4. Reconciled dbt marts

    4 identity and provenance tests bind raw facts to metric grains.

  5. Independent semantic compilation

    Cube and MetricFlow retain different requests, SQL, hashes, rows, and failure receipts.

Schema hash4467db4e18f8846e0ff3b13b83bf31eccf293a1a1f973bb4ffce92d05dca3fe6
Normalized projection hash73534730dd8f504e70db4d2aa7ee2095ed3f2fb7b6143be1fbc4b5741a9cec24
Source classsynthetic_okurka_operations
Primary sales traceraw.pos_lines + raw.product_attributes + raw.products + raw.storesanalytics/retail/dbt/models/marts/mart_okurka_sales_line.sqlanalytics.mart_okurka_sales_lineanalytics/retail/cube/model/okurka_metrics.yml → Cube → compiled SQL
Cube · primary sales probe5c0db1fad0ac8ce9

Native request

{
  "cubeSql": "SELECT okurka_sales.product_segment, MEASURE(okurka_sales.net_sales) AS net_sales, MEASURE(okurka_sales.gross_margin_pct) AS gross_margin_pct FROM okurka_sales WHERE okurka_sales.metric_time >= '2026-06-01' AND okurka_sales.metric_time < '2026-07-01' GROUP BY 1 ORDER BY 2 DESC",
  "nativeQuery": {
    "dimensions": [
      "okurka_sales.product_segment"
    ],
    "measures": [
      "okurka_sales.net_sales",
      "okurka_sales.gross_margin_pct"
    ],
    "order": [
      [
        "okurka_sales.net_sales",
        "desc"
      ]
    ],
    "segments": [],
    "timeDimensions": [
      {
        "dateRange": [
          "2026-06-01T00:00:00.000Z",
          "2026-06-30T23:59:59.999Z"
        ],
        "dimension": "okurka_sales.metric_time"
      }
    ]
  },
  "offset": 0,
  "pageSize": 20,
  "validatedMembers": [
    {
      "name": "okurka_sales.gross_margin_pct",
      "type": "measure"
    },
    {
      "name": "okurka_sales.metric_time",
      "type": "member"
    },
    {
      "name": "okurka_sales.net_sales",
      "type": "measure"
    },
    {
      "name": "okurka_sales.product_segment",
      "type": "member"
    }
  ]
}

Cube-compiled SQL

SELECT "okurka_sales".product_segment "okurka_sales__product_segment", sum("okurka_sales".net_sales) "okurka_sales__net_sales", 100.0 * sum("okurka_sales".gross_margin) / NULLIF(sum("okurka_sales".net_sales), 0) "okurka_sales__gross_margin_pct" 
FROM  analytics.mart_okurka_sales_line  AS "okurka_sales"
WHERE ("okurka_sales".metric_time >= $1::timestamptz AND "okurka_sales".metric_time <= $2::timestamptz)
GROUP BY 1
ORDER BY  2  DESC
LIMIT 10000
dbt MetricFlow · primary sales probe5e9b20dcd32bbe1d

Native request

{
  "group_by": [
    "okurka_sale__product_segment"
  ],
  "limit": 20,
  "metrics": [
    "okurka_net_sales",
    "okurka_gross_margin_pct"
  ],
  "order_by": [
    "-okurka_net_sales"
  ],
  "validatedMembers": [
    {
      "name": "okurka_net_sales",
      "type": "metric"
    },
    {
      "name": "okurka_gross_margin_pct",
      "type": "metric"
    },
    {
      "name": "okurka_sale__product_segment",
      "type": "group_by"
    },
    {
      "name": "metric_time",
      "type": "filter"
    },
    {
      "name": "metric_time",
      "type": "filter"
    }
  ],
  "where": "{{ TimeDimension('metric_time', 'day') }} >= '2026-06-01' and {{ TimeDimension('metric_time', 'day') }} < '2026-07-01'"
}

MetricFlow-compiled SQL

WITH sma_10007_cte AS (
  -- Read Elements From Semantic Model 'okurka_sales'
  -- Metric Time Dimension 'date'
  SELECT
    DATE_TRUNC('day', metric_time) AS metric_time__day
    , product_segment AS okurka_sale__product_segment
    , net_sales AS __okurka_net_sales
    , gross_margin AS __okurka_gross_margin_amount_internal
  FROM "retail_warehouse"."analytics"."mart_okurka_sales_line" okurka_sales_src_10000
)

SELECT
  COALESCE(subq_6.okurka_sale__product_segment, subq_12.okurka_sale__product_segment) AS okurka_sale__product_segment
  , MAX(subq_6.okurka_net_sales) AS okurka_net_sales
  , MAX(CAST(subq_12.okurka_gross_margin_amount_internal AS DOUBLE PRECISION) / CAST(NULLIF(subq_12.okurka_net_sales, 0) AS DOUBLE PRECISION)) AS okurka_gross_margin_pct
FROM (
  -- Constrain Output with WHERE
  -- Select: ['__okurka_net_sales', 'okurka_sale__product_segment']
  -- Aggregate Inputs for Simple Metrics
  -- Compute Metrics via Expressions
  SELECT
    okurka_sale__product_segment
    , SUM(okurka_net_sales) AS okurka_net_sales
  FROM (
    -- Read From CTE For node_id=sma_10007
    -- Select: ['__okurka_net_sales', 'okurka_sale__product_segment', 'metric_time__day']
    SELECT
      metric_time__day
      , okurka_sale__product_segment
      , __okurka_net_sales AS okurka_net_sales
    FROM sma_10007_cte
  ) subq_2
  WHERE metric_time__day >= '2026-06-01' and metric_time__day < '2026-07-01'
  GROUP BY
    okurka_sale__product_segment
) subq_6
FULL OUTER JOIN (
  -- Constrain Output with WHERE
  -- Select: ['__okurka_gross_margin_amount_internal', '__okurka_net_sales', 'okurka_sale__product_segment']
  -- Aggregate Inputs for Simple Metrics
  -- Compute Metrics via Expressions
  SELECT
    okurka_sale__product_segment
    , SUM(okurka_gross_margin_amount_internal) AS okurka_gross_margin_amount_internal
    , SUM(okurka_net_sales) AS okurka_net_sales
  FROM (
    -- Read From CTE For node_id=sma_10007
    -- Select: ['__okurka_gross_margin_amount_internal', '__okurka_net_sales', 'okurka_sale__product_segment', 'metric_time__day']
    SELECT
      metric_time__day
      , okurka_sale__product_segment
      , __okurka_net_sales AS okurka_net_sales
      , __okurka_gross_margin_amount_internal AS okurka_gross_margin_amount_internal
    FROM sma_10007_cte
  ) subq_8
  WHERE metric_time__day >= '2026-06-01' and metric_time__day < '2026-07-01'
  GROUP BY
    okurka_sale__product_segment
) subq_12
ON
  subq_6.okurka_sale__product_segment = subq_12.okurka_sale__product_segment
GROUP BY
  COALESCE(subq_6.okurka_sale__product_segment, subq_12.okurka_sale__product_segment)
ORDER BY okurka_net_sales DESC
LIMIT 20
ENGINE PARITY · AFTER BOTH CALLS FINISH

Same business values. Separate execution evidence.

Net Sales + Gross MarginmatchC 5c0db1fad0ac8ce9MF 5e9b20dcd32bbe1d
Comparable SalesmatchC c610be92cf4f6889MF 27325125af458650
In-store AvailabilitymatchC e10a603f9e4755f4MF 83a472ffdb9f28a7
Average Basket ValuematchC 989ef71028bb45daMF 1dcbd759dbe7e172
Attributed RevenuematchC 6cf288324b78bdcdMF d8d1355b25df0fb0

MetricFlow ratio values are multiplied by 100 only at the comparison boundary; native rows remain visible.

CLIENT-OWNED BY DESIGN

The agency leaves the execution chain.

Codex reaches two local namespaces. Each delegates to its own semantic engine and PostgreSQL. Evaluation reads completed receipts only after both engine calls finish; agenticanalytics.cz is not a runtime dependency.

Client-owned Cube and MetricFlow execution paths with the delivery agency outside runtime
WHAT THE CLIENT RECEIVES

A working analytical product the client owns.

Client-owned contract

Six metric definitions, exact dimensional permissions, refusal behavior, and named ownership live in versioned files.

Workbook matrix · ODCS-style contract · metric tests

Two real engine paths

Cube and dbt MetricFlow discover, validate, compile, and execute independently against the client warehouse.

Native requests · different SQL hashes · matched rows

Inspectable handover

Generation inputs, raw counts, dbt reconciliation, engine receipts, and limitations remain reviewable after delivery.

Hashes · manifests · compiled SQL · runbooks
ONE MORE VIEW OF THE SAME WORLD

See how Okurka’s local-producer promise could appear to a shopper.