← 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?
- A.ROW_NUMBER doesn't exist
- B.Window functions are evaluated after WHERE, so filter them in an outer query
- C.WHERE only accepts numbers
- 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 →