distinct() function

The distinct() function returns the unique values for a given column.

Function type: Selector
Output data type: Object

distinct(column: "host")

Parameters

column

Column on which to track unique values.

Data type: string

Examples

from(bucket: "telegraf/autogen")
	|> range(start: -5m)
	|> filter(fn: (r) => r._measurement == "cpu")
	|> distinct(column: "host")

DISTINCT()

This documentation is open source. See a typo? Please, open an issue.


Need help getting up and running? Get Support