• Very educational. Thank you! It's interesting that sub-query version sometimes outperforms ROW_NUMBER version in your example when proper indexes are in place. I guess the moral is to test various solutions.