min
Function
The min function is used to return the minimum value.
Syntax
min(col)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| col | Yes | Any type except BOOLEAN | Column values can be of any type except BOOLEAN. |
Return Values
Returns a value of type DOUBLE.
The return value type is the same as the col type. Return rules are as follows:
- If col is NULL, that row is excluded from the calculation.
- If col is of type BOOLEAN, it is not allowed in the computation.
Examples
- Calculate the minimum inventory (items) across all items. Example command:
select min(items) from warehouse;
Result:
_c0 600
- Used with GROUP BY to find the minimum inventory for each warehouse. Example command:
select warehouseId, min(items) from warehouse group by warehouseId;
Result:
warehouseId _c1 city1 15 city2 10 city3 19
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