PERCENTILE_CONT()
is an ordered-set aggregate function used to compute continuous percentiles from a set of values. The continuous percentile returns an interpolated value based on the distribution of the input data, while multiple continuous percentiles return an array of results matching the shape of the fractions
parameter with each non-null element replaced by the value corresponding to that percentile.
The syntax for this function is as follows:
WITHIN GROUP
clause to specify how to order the data before calculating the percentile.- fraction
: decimal value between 0 and 1 representing the desired percentile (e.g. 0.25 for the 25th percentile)
film
table from the
Pagila database, that will contain only the title
, length
and rating
columns.