Your content here
Product scope must be NAPCS-first, with every market having at least one NAPCS node or documented reason why NAPCS is unavailable. If a parent and child NAPCS are both selected, the child must not be counted twice.
create table analytics.market_product_scope (
market_definition_version_id uuid not null
references analytics.market_definition_version,
napcs_code text not null,
napcs_vintage text not null,
inclusion_type text not null check (
inclusion_type in ('include', 'exclude')
),
selection_level text not null check (
selection_level in ('leaf', 'hierarchy', 'custom_bundle')
),
allocation_weight numeric(12,8),
rationale text not null,
primary key (
market_definition_version_id,
napcs_code,
napcs_vintage,
inclusion_type
)
);