Window functions. Beginning of Data Analysis in PostgreSQL.
- AVG
- SUM
- MAX
- FILTER
- RANK
- ROW_NUMBER
- NTILE
Examples
SELECT
id,
name,
department,
started_date
rank() over(partition by department order by salary desc) AS slowest
FROM employees
Window functions. Beginning of Data Analysis in PostgreSQL.
Examples
SELECT
id,
name,
department,
started_date
rank() over(partition by department order by salary desc) AS slowest
FROM employees