Re: aggregate function ?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Raimon Fernandez <coder(at)montx(dot)com>
Cc: Novice Postgresql-list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: aggregate function ?
Date: 2007-05-18 04:49:01
Message-ID: 93981.28651.qm@web31807.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


--- Raimon Fernandez <coder(at)montx(dot)com> wrote:
> Is this the correct way to add a number to each sum_value ?

> (SELECT deure FROM assentaments WHERE oid=180108)+ sum
^^^^^^
One question why did you choose oid=180108 to identify the row to use for adding to your sum. Is
there some sort of hidden relationship here that you can use craft a better select query?
Basically, the question to ask is, what is the relationship between the rolling Sum and the
initial "shifting" value.

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Raimon Fernandez 2007-05-18 06:35:50 Re: aggregate function ?
Previous Message Raimon Fernandez 2007-05-17 17:40:36 Re: aggregate function ?