count.asciidoc 456 B

123456789101112131415161718
  1. [[esql-agg-count]]
  2. === `COUNT`
  3. Counts field values.
  4. [source.merge.styled,esql]
  5. ----
  6. include::{esql-specs}/stats.csv-spec[tag=count]
  7. ----
  8. [%header.monospaced.styled,format=dsv,separator=|]
  9. |===
  10. include::{esql-specs}/stats.csv-spec[tag=count-result]
  11. |===
  12. Can take any field type as input and the result is always a `long` not matter
  13. the input type.
  14. NOTE: There isn't yet a `COUNT(*)`. Please count a single valued field if you
  15. need a count of rows.