I've been using windows functions as they're very useful for my current requirement. row_number() is very handy for letting me know the row of the current partition. I've read the documentation on window functions and searched online, but can't find an answer to what I want. I'm hoping that someone here can tell if what I want is possible.
My question is this: is it possible to find out which partition within a window you are in, in a similar way that row_number() tells you which row within the partition you are in?
Basically, I want to know something like this, assuming 2 partitions in the window with 2 rows in each partition:
partition 1 row 1
partition 1 row 2
partition 2 row 1
partition 2 row 2
Any ideas, anyone?
