Book Contents

Book Index

Next Topic

Home

STDDEV

The non-standard function STDDEV is provided for compatibility with other databases. It is semantically identical to STDDEV_SAMP.

STDDEV_SAMP evaluates the statistical sample standard deviation for each member of the group.

STDDEV_SAMP(expression) = SQRT(VAR_SAMP(expression))

Syntax

STDDEV_SAMP(expression)

Semantics

 

expression

(INTEGER, BIGINT, DOUBLE PRECISION, or INTERVAL) contains at least one column reference

Examples

SELECT STDDEV_SAMP(b) FROM aggtest;

stddev_samp

------------------

57282.1641693241

(1 row)