Neoview SQL Reference Manual (R2.3)
RUNNINGSTDDEV Function
The RUNNINGSTDDEV function is a sequence function that returns the standard deviation of
nonnull values of a column up to and including the current row of an intermediate result table
ordered by a SEQUENCE BY clause in a SELECT statement. See “SEQUENCE BY Clause”
(page 278).
RUNNINGSTDDEV is a Neoview SQL extension.
RUNNINGSTDDEV (column-expression)
column-expression
specifies a derived column determined by the evaluation of the column expression.
RUNNINGSTDDEV returns the standard deviation of nonnull values of
column-expression up to and including the current row.
Considerations for RUNNINGSTDDEV
Equivalent Result
The result of RUNNINGSTDDEV is equivalent to:
SQRT(RUNNINGVARIANCE(column-expression))
Examples of RUNNINGSTDDEV
Return the standard deviation of nonnull values of I1 up to and including the current row:
SELECT RUNNINGSTDDEV (I1) AS STDDEV_I1
FROM mining.seqfcn
SEQUENCE BY TS;
STDDEV_I1
-------------------------
0.00000000000000000E+000
1.55273578080753976E+004
1.48020166531456112E+004
1.25639147428923072E+004
1.09258501408357232E+004
--- 5 row(s) selected.
Note that you can use the CAST function for display purposes. For example:
SELECT CAST(RUNNINGSTDDEV (I1) AS DEC (18,3))
FROM mining.seqfcn
SEQUENCE BY TS;
(EXPR)
--------------------
.000
15527.357
14802.016
12563.914
10925.850
--- 5 row(s) selected.
RUNNINGSTDDEV Function 411