1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. The window function ROW_NUMBER() OVER (...) is used to:

Added 30 Nov -0001

The window function ROW_NUMBER() OVER (...) is used to:

  1. count the distinct values appearing in a column
  2. rank ties with equal numbers as equal
  3. sum a numeric column across all rows
  4. assign a sequential number to rows within a partition Correct answer

Correct answer

D. assign a sequential number to rows within a partition

18 views

MCQSEXAM

Explanation

ROW_NUMBER numbers rows consecutively within each partition, even when values tie.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs