This is part eleven in a series on window functions in SQL Server.

What Did We Learn?

Over the course of this series, we learned a lot about window functions. We started off with an overview of the concept and then moved on to the various types of functions (aggregate, ranking, offset, statistical, and ordered set). After that, we looked at good use cases as well as limitations in the product today. Finally, we covered performance tuning via indexing and batch mode operation.

Learn More

If you want to learn more, I have an entire talk on the topic. At that link, you can get slides and demo code. I also call out two people in whose debt I find myself:

  • I am indebted to Itzik Ben-Gan for the outstanding work he has done around teaching window functions. Go out and buy a copy of his window functions book; I guarantee it’s worth the money.
  • Erik Darling is another person in the space doing outstanding work. Check out a series of blog posts starting with this one and moving forward for query tuning and batch mode techniques I reference during my talk, as well as several advanced techniques I didn’t have the time in my talk to cover.

You won’t regret either choice, I guarantee. Not only do I guarantee it, ah gar-o-ntee it.

Leave a comment