percentile.asciidoc 851 B

123456789101112131415161718192021222324252627282930
  1. [discrete]
  2. [[esql-agg-percentile]]
  3. === `PERCENTILE`
  4. The value at which a certain percentage of observed values occur. For example,
  5. the 95th percentile is the value which is greater than 95% of the observed values and
  6. the 50th percentile is the <<esql-agg-median>>.
  7. [source.merge.styled,esql]
  8. ----
  9. include::{esql-specs}/stats_percentile.csv-spec[tag=percentile]
  10. ----
  11. [%header.monospaced.styled,format=dsv,separator=|]
  12. |===
  13. include::{esql-specs}/stats_percentile.csv-spec[tag=percentile-result]
  14. |===
  15. [discrete]
  16. [[esql-agg-percentile-approximate]]
  17. ==== `PERCENTILE` is (usually) approximate
  18. include::../../aggregations/metrics/percentile-aggregation.asciidoc[tag=approximate]
  19. [WARNING]
  20. ====
  21. `PERCENTILE` is also {wikipedia}/Nondeterministic_algorithm[non-deterministic].
  22. This means you can get slightly different results using the same data.
  23. ====