Re: Sorted group by

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Sorted group by
Date: 2010-08-10 16:03:40
Message-ID: alpine.DEB.2.00.1008101702100.2654@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 10 Aug 2010, Thomas Kellerer wrote:
> No. It's built in (8.4) and it's called Windowing functions:
> http://www.postgresql.org/docs/8.4/static/tutorial-window.html
> http://www.postgresql.org/docs/8.4/static/functions-window.html
>
> SELECT group, last_value(value) over(ORDER BY number)
> FROM table

I may be mistaken, but as I understand it, a windowing function doesn't
reduce the number of rows in the results?

Matthew

--
Don't worry about people stealing your ideas. If your ideas are any good,
you'll have to ram them down people's throats. -- Howard Aiken

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Thom Brown 2010-08-10 16:06:16 Re: Sorted group by
Previous Message Thomas Kellerer 2010-08-10 15:56:46 Re: Sorted group by