按更新时间取最新记录

select *

     from   (select row_number() over(partition by resourceid order by updatetime desc) rank,
                            *
                      from browser.st_resource_info_h ) rn1
where rank=1

原文地址:https://www.cnblogs.com/lidapengwww/p/11392850.html