Re: Sum() rows

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Sum() rows
Дата
Msg-id 20050531201711.GH9257@surnet.cl
обсуждение исходный текст
Ответ на Sum() rows  (lucas@presserv.org)
Список 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 по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Major flood of mail to lists ...
Следующее
От: Andrew Hammond
Дата:
Сообщение: Re: Sum() rows