STDDEV_POP [aggregate]

Evaluates the statistical population standard deviation for each member of the group.

Evaluates the statistical population standard deviation for each member of the group.

Behavior type

Immutable

Syntax

STDDEV_POP ( expression )

Parameters

expression
Any NUMERIC data type or any non-numeric data type that can be implicitly converted to a numeric data type. STDDEV_POP returns the same data type as expression.
  • This function differs from the analytic function STDDEV_POP, which evaluates the statistical population standard deviation for each member of the group of rows within a window.

  • STDDEV_POP returns the same value as the square root of VAR_POP:

    STDDEV_POP(expression) = SQRT(VAR_POP(expression))
    
  • When VAR_SAMP returns NULL, this function returns NULL.

Examples

The following example returns the statistical population standard deviation for each household ID in the customer table.

=> SELECT STDDEV_POP(household_id) FROM customer_dimension;
   STDDEV_POP
------------------
 8651.41895973367
(1 row)

See also