Re: aggregate function ? - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: aggregate function ?
Date
Msg-id 93981.28651.qm@web31807.mail.mud.yahoo.com
Whole thread Raw
In response to Re: aggregate function ?  (Raimon Fernandez <coder@montx.com>)
Responses Re: aggregate function ?  (Raimon Fernandez <coder@montx.com>)
List pgsql-novice
--- Raimon Fernandez <coder@montx.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.


pgsql-novice by date:

Previous
From: Raimon Fernandez
Date:
Subject: Re: aggregate function ?
Next
From: Raimon Fernandez
Date:
Subject: Re: aggregate function ?