Book Contents

Book Index

Next Topic

Home

VAR_SAMP

STDDEV_SAMP evaluates the sample variance for each row of the group. This is defined as the sum of squares of the difference of expression from the mean of expression, divided by the number of rows remaining minus 1 (one).

Syntax

STDEV_SAMP ( expression )

Semantics

expression

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

Examples

SELECT VAR_SAMP(b) FROM aggtest;

var_samp

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

3281246331.9214

(1 row)