在SourceStatistics表中查询 AddressID字段相同的最后一条记录
select B.* from
(Select Open_ID from [SourceStatistics] where AddressID = @AddressID Group by Open_ID) A
left outer join (select A_.* from [SourceStatistics] A_,
(select Open_ID,MAX(Time) as TIME_ from [SourceStatistics] group by Open_ID) B_
where A_.Open_ID=B_.Open_ID and A_.Time=B_.TIME_) B
on A.Open_ID = B.Open_ID;
在SourceStatistics表中查询 AddressID字段相同的最后一条记录
最新推荐文章于 2022-11-17 11:15:34 发布