Neoview SQL Reference Manual (R2.2)
----------- --------------------
? 1
? 1
300 3
200 4
200 4
200 4
100 7
100 7
--- 8 row(s) selected.
Return the rank of I2 descending, excluding NULL values:
SELECT I2, RANK (I2) AS RANK
FROM cat.sch.seqfcn
WHERE I2 IS NOT NULL
SEQUENCE BY I2 DESC;
I2 RANK
----------- --------------------
300 1
200 2
200 2
200 2
100 5
100 5
--- 6 row(s) selected.
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 268).
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
RUNNINGSTDDEV Function 389