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

Re: Extracting superlatives - SQL design philosophy

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Julien Theulier" <julien(at)squidsolutions(dot)com>
Cc: "'Mose'" <mose(dot)andre(at)gmail(dot)com>, "'Dave Crooke'" <dcrooke(at)gmail(dot)com>, "'pgsql-performance'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Extracting superlatives - SQL design philosophy
Date: 2010-02-25 14:42:46
Message-ID: 2798.1267108966@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Julien Theulier" <julien(at)squidsolutions(dot)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

In response to

pgsql-performance by date

Next:From: Yu-Ju HongDate: 2010-02-25 21:23:53
Subject: dbt2 performance
Previous:From: Julien TheulierDate: 2010-02-25 09:20:45
Subject: Re: Extracting superlatives - SQL design philosophy

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