stddev_pop
Computes the population standard deviation over each aggregate.
Syntax
stddev_pop([DISTINCT] arith_expr)
Arguments
| arith_expr | The arithmetic expression on which the standard deviation is to be computed. |
Description
This function computes the population standard deviation for each aggregate from the value of arith_expr for each row in the aggregate. The value is computed as the square root of the population variance (var_pop).
If distinct is specified, duplicate values are not included in the computation.
Example
open nsfawards;
select orgid, count(*), sqrt(var_pop(amount)), stddev_pop(amount) from nsforg natural join award
group by 1 having count(*) >= 5000;
orgid count(*) sqrt(var_pop(amount)) stddev_pop(amount)
CHE 5702 576910.103367379 576910.103367379
DMI 6526 262149.54332253 262149.54332253
DMR 5381 2423104.2772563 2423104.2772563
DMS 9910 502892.258401 502892.258401
DUE 8810 409907.329019828 409907.329019828
EAR 7256 1622729.36495319 1622729.36495319
IBN 5438 256969.90628445 256969.90628445
INT 5954 601498.65086807 601498.65086807
OCE 5998 3979661.75510613 3979661.75510613
SES 5944 360739.896551804 360739.896551804