Pharma Commercial Analytics Path · Mission 11 of 25Hard

Decile-based prescriber tiers — recompute from Rx volume

First window function in this path: NTILE(10) OVER (ORDER BY ...) inside a CTE to recompute HCP deciles from raw Rx volume. The decile column on dim_hcp is a curated snapshot (refreshed quarterly); analysts re-derive it from the live ledger to validate against drift, and to slice deciles within a specific therapeutic area.

The Brief

You'll practice

NTILE(10) windowCTEAggregate-then-bucket