MCSA Querying Microsoft SQL Server 2012 Exam 70 461: Introduction
70-461 Question Answer:
You work as a database developer at ABC.com. ABC.com has a SQL Server 2012 database named SalesDB that has a table named WeeklySales. The WeeklySales table records the sales amount for each of ABC.coms 20 sales representitives. You need to write a Transact-SQL query that ranks the sales representatives by the average sales amount for the past year. You want the sales representatives with the same average sales amount to have the same rank with the subsequent rank being skipped. Which ranking function should you use?A. The RANK( ) OVER function.
B. The NTILE( ) OVER function
C. The DENSE_RANK( ) OVER function
D. The ROW_NUMBER( ) OVER function
E. The FORMAT function.
Answer: C
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.