Skip to main content
SQL Code Completion Hard +35 XP

Window Function

Complete the window function.

SQLFill in the blank
SELECT name, salary,
    RANK() ___ (ORDER BY salary DESC) AS rank
FROM employees;

Type the missing code

Show answer and explanation

Answer: OVER

Window functions use the OVER clause to define the window (partition and ordering) for the calculation.

Hint: What clause defines a window function's scope?

What this challenge tests

Code Completion in SQL: window-functions, rank.

Related challenges