Inside Microsoft® SQL Server® 2008: T-SQL Querying
by Lubor Kollar Itzik Ben-Gan Dejan Sarka, and Steve Kass
Conclusion
This chapter covered various solutions to data-aggregation problems that reused fundamental querying techniques I introduced earlier in the book. It also introduced new techniques, such as dealing with tiebreakers by using concatenation, calculating a minimum using the MAX function, pivoting, unpivoting, calculating custom aggregates by using specialized techniques, and more. This chapter also covered the new grouping sets features in SQL Server 2008 and showed how you can use those to efficiently address the need for dynamic analysis of aggregates.
As you probably noticed, data-aggregation techniques involve a lot of logical manipulation. If you’re looking for ways to improve your logic, you can practice pure logical puzzles, which ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access