least
The least function is used to return the minimum value from a list.
Syntax
least(T v1, T v2, ...)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| v1 | Yes | DOUBLE, BIGINT, or DECIMAL | The format of parameter v1 includes floating-point format, integer format, and DECIMAL format. |
| v2 | Yes | DOUBLE, BIGINT, or DECIMAL | The format of parameter v2 includes floating-point format, integer format, and DECIMAL format. |
Return Values
Returns a value of type DOUBLE.
- If v1 or v2 is of type STRING, an error is returned.
- If all parameters are NULL, NULL is returned.
Example Code
Returns 1.0.
select least(1,2.0,3,4.0);
Returns NULL.
select least(null,null);
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot