Returns a percentile over a partition for an ordered data set. The result is equal to a specific column value, the smallest distributed value that is greater than or equal to the percentile specified. PERCENTILE_DISC is available as a Window function. See also PERCENTILE_CONT, which calculates an interpolated result over a partition, rather than matching any of the specific column values. For more information on usage, please refer to Window Functions.Documentation Index
Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
Use this file to discover all available pages before exploring further.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<value> | A value between 0.0 and 1.0. | DOUBLE PRECISION, REAL |
<order_by> | An expression used for the order by clause. | Any numeric type |
<partition_by> | An expression used for the partition by clause. | Any |
Return Types
Same as the order by expression type. This function ignoresNULL values.
Example
The example below returns the 70th percentile value per student, partitioned by the game level. The percentile value returned is a value from the data set.| nickname | percentile |
|---|---|
| kennethpark | 90 |
| sabrina21 | 85 |
| ymatthews | 80 |
| rileyjon | 75 |