FirebirdSQL logo

STDDEV_POP Examples

select
  dept_no
  stddev_pop(salary)
from employee
group by dept_no

STDDEV_SAMP()

Sample standard deviation

Result type

DOUBLE PRECISION or NUMERIC depending on the type of expr

Syntax
STDDEV_POP ( <expr> )
Table 1. STDDEV_SAMP Function Parameters
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 STDDEV_SAMP returns the sample standard deviation for a group or window.NULL values are skipped.

The function STDDEV_SAMP(<expr>) is equivalent to

SQRT(VAR_SAMP(<expr>))

If the group or window is empty, contains only 1 row, or contains only NULL values, the result will be NULL.