After much thought on Mar 28 Jean-Luc Lachance wrote:
> Marcelo,
>
> Assuming that "cod" is unique and sequencial, you can use the following:
>
> SELECT *, ( SELECT SUM( value) from table as t2 where t2.cod <= t1.cod)
> as running_total
> FROM table as t1
> ORDER BY cod;
>
> jll
>
Subqueries outside of the where clause are great! I hadn't come accross
them when working with the more well advertised database products.
Are they SQL9x compliant? I try to develop using non postgres specific
tools when I can.
Jim