📅  最后修改于: 2022-03-11 15:05:26.751000             🧑  作者: Mango
-- Employees per department, ranked in salary order
SELECT EMPNO,
DEPTNO,
SAL,
rank() OVER (PARTITION BY DEPTNO ORDER BY SAL) AS MYRANK
FROM EMP;