标签:group first MF and ted over stp number rstp
select *,ROW_NUMBER() over(partition by paadmrowid order by OperateDate) as group_idx from His_AdmFirstPage where OperateDate between ‘2017-01-01‘ and ‘2017-01-31‘
按照paadmrowid字段进行分区,然后按照OperateDate进行排序
select s.* from (select *,ROW_NUMBER() over(partition by paadmrowid order by OperateDate) as group_idx from His_AdmFirstPage where OperateDate between ‘2017-01-01‘ and ‘2017-01-31‘) s
where s.group_idx=1
标签:group first MF and ted over stp number rstp
原文地址:https://www.cnblogs.com/liling1994/p/7804829.html