O'Reilly logo

Microsoft® SQL Server® 2008 Step by Step by Mike Hotek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Advanced Data Retrieval

After completing this chapter, you will be able to

  • Aggregate data

  • Filter aggregates

  • Query common table expressions

  • Combine multiple result sets

  • Find matching rows between two tables

  • Find rows that exist in one table and not in another

  • Calculate multi-level aggregates

  • Query XML data

In Chapter 8, you learned about the basic clauses available for a SELECT statement that can be used to solve a variety of business problems. In this chapter, we will delve into advanced features and recent extensions to a SELECT statement that allow you to calculate aggregates, aggregate result sets, manipulate hierarchies, find matching/nonmatching rows between tables, and query XML data.

Note

Each chapter within this book has multiple procedures ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required