Microsoft
70-451 · Question #45
70-451 Question #45: Real Exam Question with Answer & Explanation
The correct answer is B. Use a SELECT statement that uses the OVER clause to rank the customers by order amount. See the full explanation below for the reasoning.
Question
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?
Options
- ACreate a cursor that returns each account manager, and then sort the order data by order
- BUse a SELECT statement that uses the OVER clause to rank the customers by order amount
- CCreate a correlated subquery to return the order amount for each account manager.
- DCreate a table-valued function that returns the order amount for a specific account manager,
Community Discussion
No community discussion yet for this question.