Returns the first value in the window frame.
Syntax
FIRST_VALUE(expr) OVER (w)Example
Enter values below to update the example in real time.
department_id→employee_id→salary→dept_max_salary→employees→SELECT department_id, employee_id, salary,
FIRST_VALUE(salary) OVER (PARTITION BY department_id ORDER BY salary DESC) AS dept_max_salary
FROM employees;