Microsoft Exam Questions

What should you recommend?

You are a database developer. You plan to design a database solution by using SQL Server 2008.
The database includes a table that contains the following product inventory information:
Department
Class
Item
Quantity
You plan to write a query that produces the sum of quantity data broken into the following groups.
Department
Department and Class
Department and Item
Department, Class, and Item
You need to write the query byusing the minimum possible number of TransactSQL statements.
What should you recommend?

A.
Write a single query that contains a GROUP BY clause.

B.
Write a single query that contains a GROUP BY WITH CUBE clause.

C.
Write a single query that contains a GROUP BY WITH ROLLUP clause.

D.
Write a single query that contains a GROUP BY GROUPING SETS clause.