|Oracle8i SQL Reference
Release 2 (8.1.6)
Functions, 88 of 121
For information on syntax and semantics, see "Analytic Functions".
STDDEV returns sample standard deviation of expr, a set of numbers. You can use it as both an aggregate and analytic function. It differs from
STDDEV_SAMP in that
STDDEV returns zero when it has only 1 row of input data, whereas
STDDEV_SAMP returns a null.
Oracle calculates the standard deviation as the square root of the variance defined for the
VARIANCE aggregate function.
If you specify
DISTINCT, you can specify only the query_partition_clause of the analytic_clause. The ORDER_BY_clause and windowing_clause are not allowed.
The query in the following example returns the cumulative standard deviation of salary values in Department 30 ordered by hiredate: