-Original Message-
i have created the union to get all the records (giving payments negative
sign) but what i don't know how to do it is use a window function to create
the column with the running total, any short example of syntax please?
>>
You'll need to check the documentation
El 30/06/11 15:44, David Johnston escribió:
Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos
Sent: Thursday, June 30, 2011 9:00 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] question about query
Hi,
El 30/06/11 15:44, David Johnston escribió:
Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos
Sent: Thursday, June 30, 2011 9:00 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] question about query
Hi,
Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos
Sent: Thursday, June 30, 2011 9:00 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] question about query
Hi,
i am trying to obtain from the database what
sorry, i have more searching for a way to do something like this but i should
have posted the tables anyway, i have any more documents but all have a
structure like this:
invoices:
CREATE TABLE factura
(
id_factura serial NOT NULL, -- invoice id
id_cliente integer NOT NULL, -- customer
On 30/06/2011 9:00 PM, Linos wrote:
how could i calculate this pending column that does not exists in the
database and i need to be based on last result row? I would like to
get with raw SQL but the need to use any procedural language would not
be a problem.
Without knowing how you've structu
On 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello
Gurjeet!
Tried
your suggestion but this is just a marginal improvement.
Our
query needs 126 ms time, your query 110 ms.
I do not see an index access on the component table Do you have an index on component.component_id?
On 11/15/06, Gurjeet Singh <[EMAIL PROTECTED]> wrote:
On 11/15/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
Is there any other, and more performat way, to get the last history entryfor a given date than this query?
Create an (independent) index on history_timestamp column and use a min/max i
: Wednesday, November 15, 2006
4:18 PMTo: [EMAIL PROTECTED]Cc:
pgsql-general@postgresql.orgSubject: Re: [GENERAL] Question about
query optimizationOn 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Is
there any other, and more performat way, to get the last history
entr
On 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Is there any other, and more performat way, to get the last history entryfor a given date than this query?
Create an (independent) index on history_timestamp column and use a min/max in the subquery.More specifically, your query should look
10 matches
Mail list logo