Conclusion

This chapter covered various solutions to data-aggregation problems that reused key 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 others.

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, as they have a lot in common with querying problems in terms of the thought processes involved. You can find pure logic puzzles in Appendix A.

Get Inside Microsoft® SQL Server™ 2005: T-SQL Querying now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.