🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Window Functions: all 10 questions

Quiz: Window Functions · Question 5 of 10

Why can't you write WHERE ROWNUMBER() OVER (...) = 1?

Why can't you write WHERE ROW_NUMBER() OVER (...) = 1?

  1. A.ROW_NUMBER doesn't exist
  2. B.Window functions are evaluated after WHERE, so filter them in an outer query
  3. C.WHERE only accepts numbers
  4. D.You can — it works everywhere
Answer & explanation

Correct answer: Window functions are evaluated after WHERE, so filter them in an outer query

Compute the window function in a subquery/CTE, then filter outside.

Can you get the rest right without peeking?

Take the timed Quiz: Window Functions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →