PERCENTILE function support

Db2 12 introduces the PERCENTILE_CONT and PERCENTILE_DISC functions, which compute a percentile value within a given group.

PERCENTILE_CONT treats the group as a continuous distribution, meaning that if the percentage falls between two values, the result is interpolated between those two values. For example, the median (PERCENTILE_CONT(0.5)) of a group of 6 numbers would be average of the 3rd and 4th number, because the interpolated middle value between those two is found.

PERCENTILE_DISC treats the group as a set of discrete values. The result is not interpolated and is always one of the values in the group. PERCENTILE_DISC(0.5) over a group of 6 numbers returns the 3rd number.