…num-const…th PERCENTILE …expr…[ …num1…; …num2; … ] PERCENTILE …expr…
num1, num2[] -> num2
num1, num2[N] -> num2
num1[N1], num2[] -> num2[N1]
num1[N1], num2[N2] -> num2[N1]
This function takes as first operand an array or vector and the second operand can be either a numeric constant or a immediate vector of non numeric constants. It then compute the requested percentile(s).
When several percentiles are requested, the return value is a vector of the corresponding requested percentiles. If only one percentile was asked for, then it is returned directly.
Note that if you have several percentiles to compute it is much more efficient to make use of the vector syntax to compute all in one go than to perform several individual percentile operations.
expression | evaluates to |
---|---|
90th PERCENTILE [3; 5; 0; 2; 7; 8; 1; 9; 6; 10; 4] | 9 |
[10th; 90th] PERCENTILE [3; 5; 0; 2; 7; 8; 1; 9; 6; 10; 4] | [1; 9] |