Icon STDDEV

Returns the standard deviation of a given numeric expression for all selected rows.

Syntax
STDDEV([DISTINCT] <NumericExpression>)

<NumericExpression> =

Type of:

SMALLINT
INTEGER|INT
BIGINT
FLOAT
DECIMAL|NUMERIC

Returns
FLOAT

Usage
The STDDEV function returns the standard deviation of a given numeric expression for all selected rows. The standard deviation is the distance from the mean for a set of values. If all of the values are equal, then the standard deviation is zero. The selected rows can be grouped into logical sub-sets by using the GROUP BY clause of the SELECT statement. Any time the numeric expression is NULL, it is excluded from the standard deviation calculation.

Use the DISTINCT clause to specify that the standard deviation calculation will only use distinct values when calculating the result.

Examples
SELECT STDDEV(TestScore) AS Deviation
FROM Scores

SQL 2003 Standard Deviations
This function deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis function is an ElevateDB extension.
Image