percentile.asciidoc 829 B

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