oracle分组后取每组第一条数据
 
‘数据格式
 
oracle分组取每组第一条数据-LMLPHP
 
分组取第一条的效果
 
oracle分组取每组第一条数据-LMLPHP

[sql]
SELECT *
FROM (SELECT ROW_NUMBER() OVER(PARTITION BY x ORDER BY y DESC) rn,
test1.*
FROM test1)
WHERE rn = 1 ;

05-11 11:03