unique() function
The unique()
function returns all records containing unique values in a specified column.
Group keys, record columns, and values are not modified.
Function type: Selector
Output data type: Record
unique(column: "_value")
Empty tables
unique()
drops empty tables.
Parameters
column
The column searched for unique values.
Defaults to "_value"
.
Data type: String
Examples
from("example-bucket")
|> range(start: -15m)
|> filter(fn: (r) => r._measurement == "syslog")
|> unique(column: "message")
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.