8AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAYaXc47IOuU6ltmljCrTt9wAAAAAIAAAARABUAFMAAAAQZgAAAAEAACAAAAA88ORGtin1+wL1UuOs0jsFROjc3NxCBif1o1X33KB2GAAAAAAOgAAAAAIAACAAAADAz31zrYDvqesnlNKoaQM06RmjqVj7I77ctVhKyxV3UzAAAADDTdC5mmwQpAjIbUQSFvcQRuwqETSx+4JMSOnHwvjnZKWMuXAHdU0T+BcDYRl1xRNAAAAAY+ywyqeSAs6ppjEuns011sMRe2W7f5NvTjmDQVpa2V0/CObRc6dDHAFUEDO0wVlanICsET/s9VhsQp60ayAv7w0with t1 as(
select
PERCENT_RANK()
over ( partition by convert(nvarchar(10),ReceiveTime,120),f.PublicName
order by datediff(HOUR,e.ReceiveTime,isnull(d.signtime,'9999-01-01'))/24.0) pr
,datediff(HOUR,e.ReceiveTime,d.signtime)/24.0 as r,
convert(nvarchar(10),ReceiveTime,120) ReceiveTimeStr,d.TrackingNumber,f.PublicName name
from
Order_Order(nolock)e
join Logistics_Trace(nolock)d on d.OrderId=e.Id
join Logistics_Channel(nolock) f on f.id=e.ChannelId
where e.CreateTime>'2022-05-01'
)
select ReceiveTimeStr,Name,MIN(r)time from t1 where pr>=0.90
group by ReceiveTimeStr,Name
order by ReceiveTimeStr desc936false20[dbo].[BaseETL_90P_DeliveryChanne_Weight]936false3falsefalseCHECK_CONSTRAINTS21474836470with t1 as(
select
PERCENT_RANK()
over ( partition by convert(nvarchar(10),ReceiveTime,120),f.PublicName
order by datediff(HOUR,e.ReceiveTime,isnull(d.signtime,'9999-01-01'))/24.0) pr
,datediff(HOUR,e.ReceiveTime,d.signtime)/24.0 as r,
convert(nvarchar(10),ReceiveTime,120) ReceiveTimeStr,d.TrackingNumber,f.PublicName name
from
Order_Order(nolock)e
join Logistics_Trace(nolock)d on d.OrderId=e.Id
join Logistics_Channel(nolock) f on f.id=e.ChannelId
where e.CreateTime>'2022-05-01'
)
select ReceiveTimeStr,Name,MIN(r)time from t1 where pr>=0.90
group by ReceiveTimeStr,Name
order by ReceiveTimeStr desc936false20[dbo].[BaseETL_95P_DeliveryChanne_Weight]936false3falsefalseTABLOCK,CHECK_CONSTRAINTS2147483647DataSourceViewIDTableInfoObjectTypeTableDataSourceViewIDTableInfoObjectTypeTableDataSourceViewIDDataSourceViewID]]>