|
@@ -5,8 +5,8 @@ update tlive_usercount set fadjustcount=t.fadjustcount from (
|
|
|
from (
|
|
|
select ROW_NUMBER()over(partition by channelid order by time desc)as row, channelid,time,count,isnull(fadjustcount,0)as fadjustcount from tlive_usercount where fadjustcount is not null
|
|
|
and channelid in $channelid$
|
|
|
- )t where t.row=1 and count>0
|
|
|
+ )t where t.row=1
|
|
|
)t
|
|
|
)t where t.channelid=tlive_usercount.channelid and tlive_usercount.fadjustcount is null
|
|
|
|
|
|
-update tlive_usercount set fadjustcount=0 where (fadjustcount is null or count=0)and channelid in $channelid$
|
|
|
+update tlive_usercount set fadjustcount=0 where (fadjustcount is null )and channelid in $channelid$
|