1.8 KiB
1.8 KiB
title | description | aliases | menu | weight | flux/v0.x/tags | related | introduced | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
min() function | The `min()` function selects record with the lowest _value from the input table. |
|
|
102 |
|
|
0.7.0 |
The min()
function selects record with the lowest _value
from the input table.
min()
is a selector function.
min(column: "_value")
{{% warn %}}
Empty tables
min()
drops empty tables.
{{% /warn %}}
Parameters
column
The column to use to calculate the minimum value.
Default is "_value"
.
tables
Input data.
Default is piped-forward data (<-
).
Examples
{{% flux/sample-example-intro %}}
import "sampledata"
sampledata.int()
|> min()
{{% expand "View input and output" %}} {{< flex >}} {{% flex-content %}}
Input data
{{% flux/sample "int" %}}
{{% /flex-content %}} {{% flex-content %}}
Output data
_time | tag | _value |
---|---|---|
2021-01-01T00:00:00Z | t1 | -2 |
_time | tag | _value |
---|---|---|
2021-01-01T00:00:20Z | t2 | -3 |
{{% /flex-content %}} {{< /flex >}} {{% /expand %}}