News for hackers. Stuff that matters.
Re:Window Functions in SQL (2013) by lukaseder on Thursday October 06, 2016 @02:16AM (#12650572)
Thanks for clarifying. Oh, I see yes indeed. We can only nest aggregate functions inside of window functions, not the other way round (unless resorting to derived tables, views, ctes, etc.). Indeed, it's logical to know why it's not possible (the way the language was designed), but the language could have been designed differently.

Do note that Oracle has the KEEP clause that might probably solve your issue with aggregate functions only... But it's a rather esoteric, vendor-specific extension.

Anyway, I do agree, what you're describing would be a very nice feature.

There are no comments on this comment yet.