Expert T-SQL Window Functions in SQL Server 2019: The Hidden Secret to Fast Analytic and Reporting Queries by Kathi Kellenberger

Kathi Kellenberger . Unknown Year . English

Become an expert who can use window functions to solve T-SQL query problems. Replace slow cursors and self-joins with queries that are easy to write and perform better. This new edition provides expanded examples, including a chapter from the world of sports, and covers the latest performance enhancements through SQL Server 2019. Window functions are useful in analytics and business intelligence reporting. They came into full blossom with SQL Server 2012, yet they are not as well known and used as often as they ought to be. This group of functions is one of the most notable developments in SQL, and this book shows how every developer and DBA can benefit from their expressive power in solving day-to-day business problems. Once you begin using window functions, such as ROW_NUMBER and LAG, you will discover many ways to use them. You will approach SQL Server queries in a different way, thinking about sets of data instead of individual rows. Your querieswill run faster, be easier to write, and easier to deconstruct, maintain, and enhance in the future. Just knowing and using these functions is not enough. You also need to understand how to tune the queries. Expert T-SQL Window Functions in SQL Server clearly explains how to get the best performance. The book also covers the rare cases when older techniques are the best bet. What You Will Learn Solve complex query problems without cumbersome self-joins that run slowly and are difficult to read Create sliding windows in a result set for computing such as running totals and moving averages Return aggregate and detail data simultaneously from the same SELECT statement Compute lag and lead and other values that access data from multiple rows in a result set Understand the OVER clause syntax and how to control the window Avoid framing errors that can lead to unexpected results Who This Book Is For Anyone who writes T-SQL queries, including database administrators, developers, business analysts, and data scientists. Before reading this book, you should understand how to join tables, write WHERE clauses, and build aggregate queries.

Categories: Self-Help

About the Author

I have been in love with technology since the first time I saw computer code for the TRS-80 over 30 years ago. Unfortunately, I was just about to start my career as a pharmacist! After learning Visual Basic, C++, and HTML around 1995, I decided to leave my original profession and do whatever I needed to do to work with computers. Thanks to Y2K, programming jobs were plentiful, and I managed to leave pharmacy and have never looked back. Eventually I became a database administrator and started speaking and writing. In 2005, I was asked to help with a book, Professional SQL Server 2005 Integration Services. My life has been crazy and exciting since then! I began working for one of my favorite companies, Redgate Software, in 2017. I'm the editor of Simple-Talk (https://www.red-gate.com/simple-talk/), the online technical journal. There you will find articles about the Microsoft Data Platform, .NET, Cloud Computing, and more.

Books from Similar Categories

Books from the Same Genre

Download BookR now and choose mindful reading!

Download Now!