Oracle 以某字段分组,以某字段排序,取前几条

    xiaoxiao2021-03-25  139

    

    select * from (select 表.*, row_number() over(partition by 以此字段为分组  order by 以此字段排序 desc) rn

    from 表) where rn=1   --表示取第一个

    转载请注明原文地址: https://ju.6miu.com/read-8767.html

    最新回复(0)