STDDEV_SAMP
Examples
select
dept_no
stddev_samp(salary)
from employee
group by dept_no
STDDEV_SAMP
Examplesselect
dept_no
stddev_samp(salary)
from employee
group by dept_no
VAR_POP()
Population variance
DOUBLE PRECISION
or NUMERIC
depending on the type of expr
VAR_POP ( <expr> )
Parameter | Description |
---|---|
expr |
Numeric expression.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF.Aggregate functions are not allowed as expressions. |
The function VAR_POP
returns the population variance for a group or window.NULL
values are skipped.
The function VAR_POP(<expr>)
is equivalent to
(SUM(<expr> * <expr>) - SUM (<expr>) * SUM (<expr>) / COUNT(<expr>)) / COUNT (<expr>)
If the group or window is empty, or contains only NULL
values, the result will be NULL
.
VAR_POP
Examplesselect
dept_no
var_pop(salary)
from employee
group by dept_no
VAR_SAMP()
Sample variance
DOUBLE PRECISION
or NUMERIC
depending on the type of expr
VAR_SAMP ( <expr> )
Parameter | Description |
---|---|
expr |
Numeric expression.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF.Aggregate functions are not allowed as expressions. |
The function VAR_POP
returns the sample variance for a group or window.NULL
values are skipped.
The function VAR_SAMP(<expr>)
is equivalent to
(SUM(<expr> * <expr>) - SUM(<expr>) * SUM (<expr>) / COUNT (<expr>)) / (COUNT(<expr>) - 1)
If the group or window is empty, contains only 1 row, or contains only NULL
values, the result will be NULL
.