1
SQLAdvanced#windows
A function computed over a set of rows related to the current row (its window) without collapsing the result set, declared with OVER (PARTITION BY ... ORDER BY ...).
SELECT name, dept_id, salary,
AVG(salary) OVER (PARTITION BY dept_id) AS dept_avg
FROM employees;