[Sqlalchemy-tickets] Issue #3049: support range specificaiton in window function (zzzeek/sqlalchemy
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-05-13 03:48:18
|
New issue 3049: support range specificaiton in window function https://bitbucket.org/zzzeek/sqlalchemy/issue/3049/support-range-specificaiton-in-window Mike Bayer: e.g. ``` #!sql SELECT func(x) OVER (ORDER BY x RANGE BETWEEN UNBOUNDED PRECEDING AND 10 FOLLOWING) ``` see the syntax [here](http://www.postgresql.org/docs/9.1/static/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS) and [here](http://tapoueh.org/blog/2013/08/20-Window-Functions), also might think of having the named window function. so for this we have the option for strings: func.foo(x).over(frame="RANGE BETWEEN UNBOUNDED PRECEDING AND 10 FOLLOWING) or maybe an elaborate generative thing func.foo(x).over().rows(start="unbounded preceding", end="current row") |