unique() function

The unique() function returns all records containing unique values in a specified column. Group keys, record columns, and values are not modified. unique() is a selector function.

unique(column: "_value")

Empty tables

unique() drops empty tables.



Column to search for unique values. Defaults to "_value".


Input data. Default is piped-forward data (<-).


The following example uses data provided by the sampledata package to show how unique() transforms data.

import "sampledata"
    |> unique()

View input and output

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.