Re: sum() over (partition by order) question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sum() over (partition by order) question
Date: 2008-12-31 22:06:23
Message-ID: 15835.1230761183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> so I have to modify query to get expected values
> postgres=# select a, b, last_value(a) over (partition by b),
> last_value(a) over (partition by b order by a RANGE BETWEEN UNBOUNDED
> PRECEDING AND UNBOUNDED FOLLOWING) from foo;

> it should be noticed in doc?

It is --- see the comments at the bottom of

http://developer.postgresql.org/pgdocs/postgres/functions-window.html

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2008-12-31 22:13:29 Re: sum() over (partition by order) question
Previous Message Pavel Stehule 2008-12-31 21:55:22 Re: sum() over (partition by order) question