Category Archives: T-SQL Window Functions

New Book on T-SQL Window Functions!

I am very pleased to announce that my new book “Expert T-SQL Window Functions in SQL Server” is now available! This book covers everything I talk about in my two window function presentations plus even more material. I am also thrilled … Continue reading

Posted in T-SQL Window Functions | 13 Comments

Code and Slides for Nebraska.Code() Conference

Thursday at Nebraska.Code() Conference, I taught a workshop on T-SQL Query tuning. It was a great afternoon. Here are the files. I also presented my T-SQL Window Function session on Friday afternoon. Files for that presentation are here.

Posted in T-SQL, T-SQL Window Functions | 5 Comments

When the Performance of LAG Lags Behind

My favorite T-SQL windowing functions are LAG and LEAD. LAG and LEAD let you take a peek at another row and grab any column you need in your results. They are easy to use and perform great…except when they don’t. … Continue reading

Posted in T-SQL, T-SQL Window Functions | Leave a comment