Skip site navigation (1) Skip section navigation (2)

Re: aggregate function ?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Raimon Fernandez <coder(at)montx(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: aggregate function ?
Date: 2007-05-15 23:57:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
> All the records are from the same table, ...

True. But notice that the examples that I provided also referenced only one table.  If you look
closely, you will see that I am querying the table twice. Once ( with the alias name "A" ) to find
your list of rows and once ( with the alias name "B" ) to find the running total.

> ... the letters were just row  
> data.

Yes, I expected that you were simplifying you data in the example that you used.  However, since
you were able to abstract you row data as single letters, conversely you should be able to extend
the example I provided to fit your table's design.

> So I should know the value of the row that is before the one I'm  
> going to fetch ...

I do not understand you question here.

Richard Broesma Jr.

In response to


pgsql-novice by date

Next:From: Raimon FernandezDate: 2007-05-16 00:42:13
Subject: Re: aggregate function ?
Previous:From: John DeSoiDate: 2007-05-15 23:54:19
Subject: Re: Invalid byte sequence for encoding "UTF8"

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group