The STDEV function

The STDEV function computes the standard deviation for the selected rows. It is the square root of the VARIANCE function.

You can apply the STDEV function only to numeric columns. The following query finds the standard deviation on a population:
SELECT STDEV(age) FROM u_pop WHERE age > 21;
As with the other aggregates, the STDEV function applies to the rows of a group when the query includes a GROUP BY clause, as the following example shows:
SELECT STDEV(age) FROM u_pop
   GROUP BY state
   WHERE STDEV(age) > 21;

Nulls are ignored unless every value in the specified column is null. If every column value is null, the STDEV function returns a null for that column. For more information about the STDEV function, see the Expression segment in the HCL OneDB™ Guide to SQL: Syntax.