One issue with window functions is that you can't use the resulting value in the WHErE subclause or as a JOIN predicate. However you can get around this by storing the original query in a common table expression and then you CAN use the value as it is now encapsulated in the driving dataset
One issue with window functions is that you can't use the resulting value in the WHErE subclause or as a JOIN predicate. However you can get around this by storing the original query in a common table expression and then you CAN use the value as it is now encapsulated in the driving dataset
Thanks Aaron, that's a great tip :D