STDDEV_SAMP, STD_DEV

STDDEV_SAMP returns the statistical standard deviation of all values in <number-expression>, evaluated for each row remaining in the group and defined as the square root of the sample variance (VAR_SAMP).

Syntax

STDDEV_SAMP ( [DISTINCT | ALL] <<number-expression>> )

where ALL includes (and DISTINCT excludes) duplicate values in the input set. ALL is the default. When the the input set has no non-null data, STDDEV_SAMP returns NULL.

<number-expression> can be any any numeric expression.

You may use STDDEV_SAMP as either an aggregate or an analytic function.

STD_DEV is an alias of STDDEV_SAMP.