Neoview SQL Reference Manual (R2.4 SP2)
SELECT deptnum, empnum, COUNT(salary)
OVER (PARTITION BY deptnum ORDER BY empnum ROWS 3 PRECEDING)
FROM persnl.employee;
• Return the running count of employees within each department:
SELECT deptnum, empnum, COUNT(*)
OVER (PARTITION BY deptnum ORDER BY empnum ROWS UNBOUNDED PRECEDING)
FROM persnl.employee;
484 OLAP Functions