Problem Statement
Which function returns a continuous percentile value as a window calculation in engines that support it?
Explanation
PERCENTILE_CONT computes a value at the requested percentile using interpolation across ordered data. It can run as an ordered-set aggregate or as a window function.
PERCENT_RANK and CUME_DIST return relative ranks between zero and one. NTILE splits rows into buckets.
Code Solution
SolutionRead Only
PERCENTILE_CONT(0.9) WITHIN GROUP (ORDER BY amount) OVER (PARTITION BY region) AS p90_amount
