min()
min(col [, ...cols])
returns the minimum value of the provided column(s) in the input datastream. If multiple columns are provided, their values are lexically ordered as a tuple—see max()—except null
values are considered the greatest variant instead of the least.
Note
min(a, b)
is not the same as min(a), min(b)
. To get the minimum values of multiple columns, run a stats
query, e.g. stats min(a), min(b)
. See stats() for more information.
Returns
A table with one row and one column for each col
provided, called @q.min[i]
, where i
is the index of col
in the arguments. If only one col
was provided, the column is called @q.min
.
Example
Return the minimum elapsed time for a request in the checkout_api service.
Last updated