PostgreSQL - Window Functions in PostgreSQL
What is wrong with this query?
SELECT id, salary, SUM(salary) OVER (PARTITION BY department ORDER BY salary) AS running_total FROM employees;