数据格式:
分组取第一条的效果:
sql语句:
SELECT * FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY x ORDER BY y DESC)rn, test1.* FROM test1) WHERE rn = 1 ;
时间: 2024-10-06 09:31:47
数据格式:
分组取第一条的效果:
sql语句:
SELECT * FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY x ORDER BY y DESC)rn, test1.* FROM test1) WHERE rn = 1 ;