Add aggregate percentile function support (PERCENTILE)
It would be useful to have a built-in aggregate function in Firebird that computes percentiles (for example the 90th, 95th percentile) over a dataset. Currently there is no native support for percentile calculation in Firebird, which forces users to resort to procedural code or external post-processing. Such a function would simplify statistical analyses and reporting tasks where percentiles are required. The request is to consider adding an aggregate percentile function (or functions) as a feature to the SQL engine.
In what way does window function PERCENT_RANK not work for you?
In any case, this is probably a duplicate of #7632.
Implimented in https://github.com/FirebirdSQL/firebird/pull/8807