SQL - Advanced Window Functions
Given the table
Employees with columns id, department, and salary, what will the query below return?SELECT id, salary, NTH_VALUE(salary, 2) OVER (PARTITION BY department ORDER BY salary DESC) AS second_highest FROM Employees;
