Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support Array values for percentiles #16

Open
justinbarclay opened this issue Apr 1, 2024 · 0 comments
Open

Feature Request: Support Array values for percentiles #16

justinbarclay opened this issue Apr 1, 2024 · 0 comments

Comments

@justinbarclay
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant