percentile

This function is used to return the numerical value at a certain percentage point within a range of values.

Syntax

percentile(BIGINT col, p)

Parameters

Table 1 Parameters

Parameter

Mandatory

Description

col

Yes

Columns with a data type of numeric. If the values are of any other type, NULL is returned.

p

Yes

The value should be between 0 and 1. Otherwise, NULL is returned.

Return Values

The return value is of the DOUBLE type.

The value should be between 0 and 1. Otherwise, NULL is returned.

Example Code