count() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.50 is the most recent stable version of Flux.

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(column: "_value")

Parameters

column

Column on which to operate. Defaults to "_value".

Data type: String

Examples

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

COUNT()