This Oracle tutorial explains how to use the Oracle/PLSQL STDDEV function with syntax and examples.
The Oracle/PLSQL STDDEV function returns the standard deviation of a set of numbers.
The STDDEV function can be used two ways - as an Aggregate function or as an Analytic function.
The syntax for the STDDEV function when used as an Aggregate function is:
A numeric value or formula.
The STDDEV function returns a numeric value.
The STDDEV function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle STDDEV function examples and explore how to use the STDDEV function in Oracle/PLSQL.
For example:
The SQL statement above would return the standard deviation of the bonus field in the employees table.
The syntax for the STDDEV function when used as an Analytic function is:
The STDDEV function returns a numeric value.
The STDDEV function can be used in the following versions of Oracle/PLSQL:
The SQL statement above would return the cumulative standard deviation of the bonuses in the Marketing department in the employees table, ordered by salary.