lowestAverage() function
The lowestAverage()
function calculates the average of each table in the input stream returns the lowest n
records.
The function outputs a single aggregated table containing n
records.
lowestAverage()
is a selector function.
lowestAverage(
n:10,
column: "_value",
groupColumns: [],
)
Empty tables
lowestAverage()
drops empty tables.
Parameters
n
Number of records to return.
column
Column by which to sort.
Default is "_value"
.
groupColumns
The columns on which to group before performing the aggregation.
Default is []
.
tables
Input data.
Default is piped-forward data (<-
).
Examples
The following example uses data provided by the sampledata
package
to show how lowestAverage()
transforms data.
import "sampledata"
sampledata.int()
|> lowestAverage(n: 2, groupColumns: ["tag"])
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.