SELECT *
FROM (SELECT A.*,
RANK() OVER(PARTITION BY A.DR_ATP_ID, A.AT_CODE ORDER BY A.KEY_CODE) RANK
FROM DR_ATP_DTL A) A
WHERE RANK = 1
时间: 2024-10-21 15:39:44
SELECT *
FROM (SELECT A.*,
RANK() OVER(PARTITION BY A.DR_ATP_ID, A.AT_CODE ORDER BY A.KEY_CODE) RANK
FROM DR_ATP_DTL A) A
WHERE RANK = 1