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.
The second peeve is to do with filters, e.g.:
That is, how many events of type 42 are there up to 5 seconds before the current event.In both cases, it's sad not being able to address the current row as well as the row in the window. I'm not saying either form is completely impossible to get working somehow, I just think it'd be a nice feature.