T-SQL Power! The OVER Clause: Your Key to No-Sweat Problem Solving
Play T-SQL Power! The OVER Clause: Your Key to No-Sweat Problem Solving
Have you ever stared at a convoluted requirement, unsure of where to begin and how to get there with T-SQL? Have you ever spent three days working on a long and complex query, wondering if there might be a better way? Good news: The OVER clause, first introduced in Microsoft SQL Server 2005, can be used to quickly and easily solve a number of problems that were previously very difficult or seemingly impossible. In this session, learn to leverage aggregations and windowing operations to gain insight without losing information, enabling you to answer a number of interesting business problems with ease. Several demos are shown to highlight the utility of the OVER clause for solving a large number of difficult--yet common--query problems, including custom paging schemes, data de-duplication, "top-N" problems, and complex statistical calculations. You also learn how to creatively apply the feature to help with performance optimization of certain classes of tough queries. If you're tired of writing queries that just don't seem good enough, attend this session to get to the next level.