Docs

v2.0

count() function

The count() function outputs the number of records in each aggregated column. It counts both null and non-null records.

Function type: Aggregate
Output data type: Integer

count(columns: ["_value"])

Parameters

columns

A list of columns on which to operate Defaults to ["_value"].

Data type: Array of strings

Examples

from(bucket: "telegraf/autogen")
  |> range(start: -5m)
  |> count()
from(bucket: "telegraf/autogen")
  |> range(start: -5m)
  |> count(columns: ["_value"])

COUNT()


Bug Reports and Feedback

Thank you for being willing to help test InfluxDB v2.0 alpha! Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation.

Submit feedback in the InfluxData Community