Re: Sum() rows

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: lucas(at)presserv(dot)org
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sum() rows
Date: 2005-05-31 20:17:11
Message-ID: 20050531201711.GH9257@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, May 31, 2005 at 01:36:48PM -0300, lucas(at)presserv(dot)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)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Hammond 2005-05-31 21:04:27 Re: Sum() rows
Previous Message Marc G. Fournier 2005-05-31 17:45:56 Major flood of mail to lists ...