需求
该SQL是一个子SQL,需要查询出某个人所有过往履历中职务最高的
SELECT a."EMP_ID",a."CADRE_LEVEL"
FROM (SELECT ROW_NUMBER() OVER(PARTITION BY EMP_ID ORDER BY CADRE_LEVEL DESC) rn,
P_RESUME.*
FROM P_RESUME) a where a.rn=1
标签:RESUME,最大值,LEVEL,CADRE,分组,EMP,Oracle,rn,SELECT
来源: https://www.cnblogs.com/njpkhuan/p/16258525.html