mv_avg.asciidoc 353 B

123456789101112
  1. [[esql-mv_avg]]
  2. === `MV_AVG`
  3. Converts a multivalued field into a single valued field containing the average
  4. of all of the values. For example:
  5. [source,esql]
  6. ----
  7. include::{esql-specs}/math.csv-spec[tag=mv_avg]
  8. include::{esql-specs}/math.csv-spec[tag=mv_avg-result]
  9. ----
  10. NOTE: The output type is always a `double` and the input type can be any number.