This function is used to return the deviation of a specified column.
stddev_pop(col)
Parameter |
Mandatory |
Description |
---|---|---|
col |
Yes |
Columns with a data type of numeric. If the value is of any other type, NULL is returned. |
The return value is of the DOUBLE type.
select stddev_pop(items) from warehouse;
The command output is as follows:
_c0 1.342355
select warehourseId, stddev_pop(items) from warehourse group by warehourseId;
The command output is as follows:
warehouseId _c1 city1 1.23124 city2 1.23344 city3 1.43425