avg.asciidoc 328 B

123456789101112131415
  1. [discrete]
  2. [[esql-agg-avg]]
  3. === `AVG`
  4. The average of a numeric field.
  5. [source.merge.styled,esql]
  6. ----
  7. include::{esql-specs}/stats.csv-spec[tag=avg]
  8. ----
  9. [%header.monospaced.styled,format=dsv,separator=|]
  10. |===
  11. include::{esql-specs}/stats.csv-spec[tag=avg-result]
  12. |===
  13. The result is always a `double` not matter the input type.