Reputation: 1987
I suspect that Redshift does not support named windows, as Postgres has since at least version 8.4:
select stuff
, stuff_category
, sum(dollars) over W
from table
window W as (partition by stuff_category)
However I would like to know definitively and I can't find a reference, or any post that says 'no we didn't implement this for very good reason yada yada.'
The AWS Redshift SQL Reference makes no mention of the 'window as' syntax - I suppose I should take this as an answer.
Here's an SO answer relating to Postgres named windows
Here's the Postgres 8.4 documentation on WINDOW AS ()
syntax
Upvotes: 10
Views: 813
Reputation: 1987
Redshift does not support named windows.
As I have learned over time, the RS documentation will specify what is supported and if not mentioned its safe to assume it is not supported. There are no easter eggs or undocumented features to try and find, Legend of Zelda style.
AWS Window Function Documentation
AWS Docs Redshift and Postgres Comparison This does not mention window functions, but is a good resource for this type of question.
Upvotes: 9