mv_avg.asciidoc 408 B

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