Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Why can a window function not be used directly in a WHERE clause?

  1. A WHERE is evaluated before window functions, so the result must be filtered in an outer query
  2. B Window functions return multiple values
  3. C It is a syntax restriction with no reason
  4. D They can be used in WHERE
Answer

WHERE is evaluated before window functions, so the result must be filtered in an outer query

Wrapping the query in a subquery or CTE and filtering there is the standard pattern for getting the top row per group.

All Data MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as