orcale 查询多个字段 并根据某个字段去重

select * from (
select row_number()over(partition by xx order by id desc) as num,r.*
from tableName r
) a where a.num=1

猜你喜欢

转载自blog.csdn.net/weixin_39634041/article/details/83584886