Repository navigation
docs(sql): document percentile_cont and percentile_disc - #599
Merged
Merged
Conversation
Document the exact percentile functions added in questdb/questdb#6680: percentile_cont and percentile_disc, their quantile_cont and quantile_disc aliases, the DOUBLE[] multi-percentile form, and the whole-partition window functions. Add the array form of approx_percentile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace ten approx_percentile calls and ten UNION ALL branches with one percentile_disc call over an array of percentiles, expanded with UNNEST WITH ORDINALITY. Add a non-cumulative variant using lag(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
🚀 Build success! Latest successful preview: https://preview-599--questdb-documentation.netlify.app/docs/ Commit SHA: b48196d
|
javier
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the exact percentile functions added in questdb/questdb#6680.
percentile_cont / quantile_contandpercentile_disc / quantile_discsections. They cover the single-percentile andDOUBLE[]multi-percentile forms, how each value is computed (SQL standard / PostgreSQL definitions), return types (percentile_discreturnsLONGfor integer input), NULL handling, and limitations (FILL(LINEAR), constant fill on the array form, memory use per group). Both are added to the Statistical aggregates table.approx_percentile: documents the newDOUBLE[]form and links to the exact functions.percentile_cont() / percentile_disc()reference section (whole-partition only, constant percentile, not in live views) and a quick-reference row on the overview.percentile_disccall over a percentile array withUNNEST ... WITH ORDINALITY, replacing tenapprox_percentilecalls and tenUNION ALLbranches, and adds a non-cumulative variant usinglag().All result tables and documented behaviors were checked against a build of QuestDB master.
Dependencies
🤖 Generated with Claude Code