min
Aggregate Function
min — minimum value of input values
Synopsis
min(...number) -> number
Description
The min aggregate function computes the minimum value of its input.
Examples
Minimum value of simple sequence:
echo '1 2 3 4' | super -z -c 'min(this)' -
=>
1
Continuous minimum of simple sequence:
echo '1 2 3 4' | super -z -c 'yield min(this)' -
=>
1
1
1
1
Unrecognized types are ignored:
echo '1 2 3 4 "foo"' | super -z -c 'min(this)' -
=>
1
Minimum value within buckets grouped by key:
echo '{a:1,k:1} {a:2,k:1} {a:3,k:2} {a:4,k:2}' |
super -z -c 'min(a) by k |> sort' -
=>
{k:1,min:1}
{k:2,min:3}