Re: Sum() rows - Mailing list pgsql-sql

From Alvaro Herrera
Subject Re: Sum() rows
Date
Msg-id 20050531201711.GH9257@surnet.cl
Whole thread Raw
In response to Sum() rows  (lucas@presserv.org)
List pgsql-sql
On Tue, May 31, 2005 at 01:36:48PM -0300, lucas@presserv.org wrote:
> Hi.
> How can I sum a row and show the sum for each row???
> For example, in a finances table that have the total movimentation(debit/credit)
> in the bank.

I think you can write an aggregate in, say PL/Python to do this.  IIRC
there was an article on General Bits about this.  Search for "running
aggregates".  I think there is something in issue #23.  See #29 as well.

-- 
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Las cosas son buenas o malas segun las hace nuestra opinión" (Lisias)


pgsql-sql by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Major flood of mail to lists ...
Next
From: Andrew Hammond
Date:
Subject: Re: Sum() rows