active_median icon indicating copy to clipboard operation
active_median copied to clipboard

Feature Request: Support Array values for percentiles

Open justinbarclay opened this issue 10 months ago • 0 comments

While checking out your active median, I noticed one missing feature that I would like. When doing percentile calculations, it's often across a set of percentiles. Something like Model.percentile(:value, [0.1, 0.25, 0.75, 0.9]). I know this feature is supported in postgres

percentile_cont(fractions) WITHIN GROUP (ORDER BY sort_expression) multiple continuous percentile: returns an array of results matching the shape of the fractions parameter, with each non-null element replaced by the value corresponding to that percentile

justinbarclay avatar Apr 01 '24 21:04 justinbarclay