From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Theulier <julien@squidsolutions.com>
Cc: 'Mose' <mose.andre@gmail.com>
Cc: 'Dave Crooke' <dcrooke@gmail.com>
Cc: 'pgsql-performance' <pgsql-performance@postgresql.org>
Subject: Re: Extracting superlatives - SQL design philosophy
Date: Thu, 25 Feb 2010 09:42:46 -0500
Message-ID: <2798.1267108966@sss.pgh.pa.us> (raw)
In-Reply-To: <000c01cab5fb$d03e4100$70bac300$@com>
References: <ca24673e1002241331l4099482aqc73649d93611767a@mail.gmail.com>
<9eb6f9411002241350m4532305ai88c5640f0e3dd864@mail.gmail.com>
<000c01cab5fb$d03e4100$70bac300$@com>
"Julien Theulier" <julien@squidsolutions.com> writes:
> Teradata provides a qualify syntax which works as a filtering condition on
> a windowed function result. This is the only DB allowing this direct
> filtering on windowed functions, from what I know.
Seems like you could easily translate that into SQL-standard syntax by
adding a level of sub-select:
select ... from (select *, window_function wf from ...) ss
where wf=1;
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, julien@squidsolutions.com, mose.andre@gmail.com, dcrooke@gmail.com
Subject: Re: Extracting superlatives - SQL design philosophy
In-Reply-To: <2798.1267108966@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox