Microsoft
70-457 · Question #69
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…
The correct answer is A. SELECT StudentCode as Code. See the full explanation below for the reasoning.
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, the same rank must be
given to these students.
- Consecutive ranks must be skipped when the same rank is assigned.
Which Transact-SQL query should you use?
Options
- ASELECT StudentCode as Code,
- BSELECT Id, Name, Marks, DENSE_RANK () OVER (ORDER BY Marks DESC) AS Rank
- CSELECT StudentCode as Code,
- DSELECT StudentCode as Code,
- ESELECT StudentCode AS Code,Marks AS Value
- FSELECT StudentCode AS Code,Marks AS Value FRCM (
- GSELECT StudentCode AS Code,Marks AS Value FROM
- HSELECT StudentCode AS Code,Marks AS Value FROM
How the community answered
(46 responses)- A74% (34)
- B7% (3)
- C4% (2)
- G13% (6)
- H2% (1)
Community Discussion
No community discussion yet for this question.