📜  oracle rank() over (partition) - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:33.299000             🧑  作者: Mango

代码示例1
-- Employees per department, ranked in salary order
SELECT EMPNO,
       DEPTNO,
       SAL,
       rank() OVER (PARTITION BY DEPTNO ORDER BY SAL) AS MYRANK
FROM EMP;