nerdexam
Microsoft

70-433 · Question #85

You need to write a query that uses a ranking function that returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition. Which…

The correct answer is D. ROW_NUMBER. ROW_NUMBER returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.

Implement Programming Objects

Question

You need to write a query that uses a ranking function that returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition. Which Transact-SQL statement should you use?

Options

  • ARANK
  • BNTILE(10)
  • CDENSE_RANK
  • DROW_NUMBER

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    5% (1)
  • C
    14% (3)
  • D
    73% (16)

Explanation

ROW_NUMBER returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.

Topics

#ROW_NUMBER#ranking functions#window functions#partition numbering

Community Discussion

No community discussion yet for this question.

Full 70-433 Practice