docs-v2/content/flux/v0.x/stdlib/experimental/min.md

1.6 KiB
Raw Permalink Blame History

title description menu weight aliases related flux/v0.x/tags introduced
experimental.min() function The `experimental.min()` function returns the record with the lowest value in the `_value` column for each input table.
flux_0_x_ref
name parent
experimental.min experimental
302
/influxdb/v2.0/reference/flux/stdlib/experimental/min/
/influxdb/cloud/reference/flux/stdlib/experimental/min/
/{{< latest "influxdb" >}}/flux/stdlib/built-in/transformations/selectors/min/
/{{< latest "influxdb" "v1" >}}/query_language/functions/#min, InfluxQL MIN()
transformations
selectors
0.112.0

The experimental.min() function returns the record with the lowest value in the _value column for each input table. experimental.min() is a selector function.

import "experimental"

experimental.min()

{{% warn %}}

Empty tables

experimental.min() drops empty tables. {{% /warn %}}

Parameters

tables

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

Examples

import "experimental"

data
    |> experimental.min()

{{< flex >}} {{% flex-content %}}

Input data
_time _value
2021-01-01T00:00:00Z 1.2
2021-01-01T00:01:00Z 0.6
2021-01-01T00:02:00Z 2.3
2021-01-01T00:03:00Z 0.9
{{% /flex-content %}}
{{% flex-content %}}
Output data
_time _value
2021-01-01T00:01:00Z 0.6
{{% /flex-content %}}
{{< /flex >}}