Docs

v2.0

unique() function

The unique() function returns all records containing unique values in a specified column.

Function type: Selector
Output data type: Object

unique(column: "_value")

Parameters

column

The column searched for unique values. Defaults to "_value".

Data type: String

Examples

from("telegraf/autogen")
 |> range(start: -15m)
 |> filter(fn: (r) => r._measurement == "syslog")
 |> unique(column: "message")

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