View Single Post
  #4 (permalink)  
Old 08-21-2006, 06:43 PM
delostilos
 
Posts: n/a
Default SQL 99 answer. Re: Create a third row that make the sum of past row + current row (i.e. a running sum)?

The following feature outside Core SQL-99 is used:

T611, "Elementary OLAP operations"
(checked with the mimer sql validator)
[sql]
SELECT week
, total
, sum(total) over (order by week desc) as running_total
FROM my_table
[/sql]
Edit/Delete Message Reply With Quote