"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