bottom() function
The bottom()
function sorts a table by columns and keeps only the bottom n
records.
bottom()
is a selector function.
bottom(n:10, columns: ["_value"])
Empty tables
bottom()
drops empty tables.
Parameters
n
Number of records to return.
columns
List of columns by which to sort.
Sort precedence is determined by list order (left to right).
Default is ["_value"]
.
tables
Input data.
Default is piped-forward data (<-
).
Examples
The following example uses data provided by the sampledata
package
to show how bottom()
transforms data.
Return rows with the two lowest values
import "sampledata"
sampledata.int()
|> bottom(n:2)
Was this page helpful?
Thank you for your feedback!
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, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.