Skip to main content

MINIMUM

Returns the minimum of the provided values.

Syntax​

MINIMUM ( expression , expression [,...n] ) 

Arguments​

expression
All arguments must be of the same data type for a valid comparison.

Return Type​

Returns the MINIMUM value with its corresponding input type.

Examples​

Examples in this section use the example blockchain.

The following example calculates the MINIMUM for the specified components by comparing the time column to a casted TIMESTAMP value.

SELECT MINIMUM(time, TIMESTAMP("2000-01-03 15:04:05.000000002")) FROM example;

Response:

MINIMUM(time, TIMESTAMP("2000-01-03 15:04:05.000000002")) [FLOAT32]
2000-01-03 07:04:05.000000002
2000-01-03 07:04:05.000000002
2000-01-03 07:04:05.000000002
2000-01-03 07:04:05.000000002