mv_avg.asciidoc 428 B

12345678910111213141516
  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.merge.styled,esql]
  6. ----
  7. include::{esql-specs}/math.csv-spec[tag=mv_avg]
  8. ----
  9. [%header.monospaced.styled,format=dsv,separator=|]
  10. |===
  11. include::{esql-specs}/math.csv-spec[tag=mv_avg-result]
  12. |===
  13. NOTE: The output type is always a `double` and the input type can be any number.