Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

STDEVP windowing function

Declaration

STDEVP ( { numeric_expression } ) OVER ( [ partition_by_clause ] [ order_by_clause ] )

Requires partition_by_clause and/or order_by_clause.

Description

The analytical window function STDEVP returns the statistical standard deviation for the population for all values within the specified window.

• The argument numeric_expression can be of any numeric type except BIT.

• The result is of type float.

• Returns a value of 0 when the number of values in the population is 0 or 1.

Example

select c1, c3, stdevp(c1) over (order by c3) from pc2;


C1 C3 STDEVP(C1)

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

1 1 0.50000000000

2 1 0.50000000000

1 0.50000000000

4 2 1.58113900000

5 2 1.58113900000

3 1.58113900000

6 records selected


TOCIndex