median.asciidoc 853 B

12345678910111213141516171819202122
  1. // This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
  2. *Examples*
  3. [source.merge.styled,esql]
  4. ----
  5. include::{esql-specs}/stats_percentile.csv-spec[tag=median]
  6. ----
  7. [%header.monospaced.styled,format=dsv,separator=|]
  8. |===
  9. include::{esql-specs}/stats_percentile.csv-spec[tag=median-result]
  10. |===
  11. The expression can use inline functions. For example, to calculate the median of the maximum values of a multivalued column, first use `MV_MAX` to get the maximum value per row, and use the result with the `MEDIAN` function
  12. [source.merge.styled,esql]
  13. ----
  14. include::{esql-specs}/stats_percentile.csv-spec[tag=docsStatsMedianNestedExpression]
  15. ----
  16. [%header.monospaced.styled,format=dsv,separator=|]
  17. |===
  18. include::{esql-specs}/stats_percentile.csv-spec[tag=docsStatsMedianNestedExpression-result]
  19. |===