Notes

Data Model

Tables backing Cannabis Brand Performance Dashboard

sell_through_facts

Weekly POS/retail sell-through, one row per SKU x retail account x week.

ColumnTypeKey
transaction_id INTEGER PK
sku_id INTEGER FK → skus.sku_id
retail_account_id INTEGER FK → retail_accounts.account_id
week_start_date DATE
state VARCHAR
channel VARCHAR
units_sold INTEGER
equivalized_units DECIMAL
net_revenue DECIMAL
list_price DECIMAL
realized_price DECIMAL
discount_amount DECIMAL
gross_margin_amount DECIMAL
promo_flag VARCHAR
promo_lift_pct DECIMAL
post_promo_baseline_units DECIMAL

skus

Product master, one row per SKU, normalized to equivalized units / mg THC.

ColumnTypeKey
sku_id INTEGER PK
sku_name VARCHAR
category VARCHAR
brand VARCHAR
form_factor VARCHAR
thc_mg DECIMAL
velocity_threshold_units DECIMAL
sku_status VARCHAR

retail_accounts

Retail door master (dispensaries/delivery), one row per account.

ColumnTypeKey
account_id INTEGER PK
account_name VARCHAR
state VARCHAR
channel VARCHAR
door_status VARCHAR

market_share_facts

Headset/BDSA category and brand share by state and week.

ColumnTypeKey
market_share_id INTEGER PK
week_start_date DATE
state VARCHAR
category VARCHAR
brand VARCHAR
market_share_pct DECIMAL
category_growth_pct DECIMAL
price_tier VARCHAR

compliance_batches

METRC batch-level inventory, testing, and licensing status.

ColumnTypeKey
batch_id INTEGER PK
sku_id INTEGER FK → skus.sku_id
state VARCHAR
days_in_inventory INTEGER
coa_status VARCHAR
license_status VARCHAR
license_expiration_date DATE

data_quality_log

Internal tracking of POS coverage, reporting lag, and missing accounts by state/week.

ColumnTypeKey
log_id INTEGER PK
week_start_date DATE
state VARCHAR
pos_coverage_pct DECIMAL
reporting_lag_days INTEGER
missing_accounts_count INTEGER