Re: Extracting superlatives - SQL design philosophy

From: Tom Lane
Subject: Re: Extracting superlatives - SQL design philosophy
Date: ,
Msg-id: 2798.1267108966@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Extracting superlatives - SQL design philosophy  ("Julien Theulier")
List: pgsql-performance

Tree view

Extracting superlatives - SQL design philosophy  (Dave Crooke, )
 Re: Extracting superlatives - SQL design philosophy  (Mose, )
  Re: Extracting superlatives - SQL design philosophy  ("Julien Theulier", )
   Re: Extracting superlatives - SQL design philosophy  (Tom Lane, )
 Re: Extracting superlatives - SQL design philosophy  ("Garrett Murphy", )
  Re: Extracting superlatives - SQL design philosophy  (Dave Crooke, )
   Re: Extracting superlatives - SQL design philosophy  (Richard Huxton, )
    Re: Extracting superlatives - SQL design philosophy  (Dave Crooke, )
     Re: Extracting superlatives - SQL design philosophy  (Richard Huxton, )
 Re: Extracting superlatives - SQL design philosophy  ("George Sexton", )
  Re: Extracting superlatives - SQL design philosophy  ("George Sexton", )
 Re: Extracting superlatives - SQL design philosophy  (Craig James, )
 Re: Extracting superlatives - SQL design philosophy  ("Pierre C", )
 Re: Extracting superlatives - SQL design philosophy  (Merlin Moncure, )
  Re: Extracting superlatives - SQL design philosophy  (Dave Crooke, )

"Julien Theulier" <> 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


pgsql-performance by date:

From: Tom Lane
Date:
Subject: Re: Extracting superlatives - SQL design philosophy
From: Yu-Ju Hong
Date:
Subject: dbt2 performance