标签:des io ar sp art on ad 时间 bs
select * from (
select Row_number() over( PARTITION BY MeterID order by a.CurrentReadDate desc) Idx,MeterID,a.CurrentReadDate,a.CurrentReadDegree from Wygl_Charge_HouseMeterDegrees a
) b
where b.Idx=1
按MeterID分组,按CurrentReadDate时间倒序,取第一行
标签:des io ar sp art on ad 时间 bs
原文地址:http://www.cnblogs.com/wangzhe/p/4027641.html