PostgreSQL - Window Functions in PostgreSQL
Given the table
What is the output of:
employees(id, department, salary) with rows:(1, 'HR', 5000), (2, 'HR', 7000), (3, 'IT', 6000), (4, 'IT', 6000)What is the output of:
SELECT id, department, salary, DENSE_RANK() OVER (PARTITION BY department ORDER BY salary DESC) FROM employees ORDER BY id;