exam questions

Exam 70-461 All Questions

View all questions & answers for the 70-461 exam

Exam 70-461 topic 1 question 215 discussion

Actual exam question from Microsoft's 70-461
Question #: 215
Topic #: 1
[All 70-461 Questions]

You develop a Microsoft SQL Server database. The database contains a table defined by the following Transact-SQL statement:

All regions have more than one employee.
You need to write a query to find the employee with the highest SalesYTD in each region with the following result set:
✑ First Name
✑ Last Name
✑ Region
✑ Sales YTD
Which Transact-SQL query should you run?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A
Use TOP 1 and RANK() OVER (PARTITION BY).
References:
https://docs.microsoft.com/en-us/sql/t-sql/functions/rank-transact-sql?view=sql-server-2017

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
lilupv
4 years, 9 months ago
I think, it is D, but where FirstName and DESC?
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...