Runningsum Function; Example Of Runningsum - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

RUNNINGSUM Function

The RUNNINGSUM function is a sequence function that returns the sum 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
RUNNINGSUM is a Neoview SQL extension.
RUNNINGSUM (column-expression)
column-expression
specifies a derived column determined by the evaluation of the column expression.
RUNNINGSUM returns the sum of nonnull values of column-expression up to and
including the current row.

Example of RUNNINGSUM

Return the sum of nonnull values of I1 up to and including the current row:
SELECT RUNNINGSUM (I1) AS SUM_I1
FROM mining.seqfcn
SEQUENCE BY TS;
SUM_I1
--------------------
--- 5 row(s) selected.
6215
34389
34389
38986
50952
"SEQUENCE BY Clause" (page
RUNNINGSUM Function
268).
401

Advertisement

Table of Contents
loading

Table of Contents