exam questions

Exam 70-461 All Questions

View all questions & answers for the 70-461 exam

Exam 70-461 topic 1 question 183 discussion

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

Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.
You create a table that has the StudentCode, SubjectCode, and Marks columns to record mid-year marks for students. The table has marks obtained by 50 students for various subjects.
You need to ensure that the following requirements are met:
✑ Students must be ranked based on their average marks.
✑ If one or more students have the same average, incremental ranks must be given based on the order they are created.
✑ Ranks must be sequential without gaps in between.
Which Transact-SQL query should you use?
A.

B.

C.

D.

E.

F.

G.

H.

Show Suggested Answer Hide Answer
Suggested Answer: C
The ROW_NUMBER numbers the output of a result set. More specifically, returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.
References:
https://docs.microsoft.com/en-us/sql/t-sql/functions/row-number-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
Currently there are no comments in this discussion, be the first to comment!
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago