Min

Not available in this language yet.
Min( value_1, value_2, ... )
Min( value_1, value_2, ... )
Min( value_1, value_2, ... )
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Min( value_1, value_2, ... )

Description

The Min function returns the smallest value in a list of numbers.

Parameters

Argument Type Definition and Requirements

value

List of Numbers

A single value or a list of values.

Returns

A number which is the minimum value from the value list.

Examples

The query below executes an array of independent min operations and returns the results in an array. The result array position matches the execution array position. The top operation in the execution array, minimum of the values 1, 5, and 22, returns a long value of 1 in the top position of the result array.

System.out.println(
        client.query( Arr(
                Min(Value(1), Value(5), Value(22)),
                Min(Value(1), Value(0), Value(3), Value(-1)),
                Min(Value(-1), Value(12), Value(3), Value(-1)),
                Min(Value(10))
        )).get());
[
 1,
 -1,
 -1,
 10
]

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!