PERCENT_RANK()
Relative rank of a row within a window partition.
DOUBLE PRECISION
PERCENT_RANK () OVER <window_name_or_spec>
PERCENT_RANK
is calculated as the [fblangref50-windowfuncs-rank] minus 1 of the current row divided by the number of rows in the partition minus 1.
In other words, PERCENT_RANK() OVER <window_name_or_spec>
is equivalent to (RANK() OVER <window_name_or_spec> - 1) / CAST(COUNT(*) OVER() - 1 AS DOUBLE PRECISION)