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: Thu, 25 Feb 2010 09:42:46 -0500
- Message-id: <2798.1267108966@sss.pgh.pa.us> <text/plain>
"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
Home |
Main Index |
Thread Index