PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the query executes as quickly as possible

You are a database developer. You plan to design a database solution by using SQL Server
2008. Account managers in your company store order data in a database. Your company
requires a list of customers for each account manager. The list must be sorted in the
descending order of the order amount. You create a query that generates the list at the end
of each month. You need to ensure that the query executes as quickly as possible. What
should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Create a correlated subquery to return the order amount for each account manager. Sort
the results first by account manager and then by order amount.

B.
Use a SELECT statement that uses the OVER clause to rank the customers by order
amount for each account manager.

C.
Create a table-valued function that returns the order amount for a specific account

manager, and then create a query by using the CROSS APPLY clause to list each account
manager. Sort the results first by account manager and then by order amount.

D.
Create a cursor that returns each account manager, and then sort the order data by
order amount.


Leave a Reply