窗口函数
postgre中的窗口函数相关的内容。从官方的手册中,有很好的说明。
资源
http://postgres.cn/docs/13/tutorial-window.html
http://postgres.cn/docs/13/functions-window.html
http://postgres.cn/docs/13/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
SELECT sum(salary) OVER w, avg(salary) OVER w
FROM empsalary
WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);