This function is used to return the maximum value.
max(col)
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
col |
Yes |
Any type except BOOLEAN |
The value can be of any type except BOOLEAN. |
The return value is of the DOUBLE type.
The return type is the same as the type of col. The return rules are as follows:
select max(items) from warehouse;
The command output is as follows:
_c0 900
select warehourseId, max(items) from warehouse group by warehourseId;
The command output is as follows:
warehouseId _c1 city1 200 city2 300 city3 400