| 12345678 |
- select channelid,tagentsid,t.fbrand,t.saleprodclass,count as fcount,t.channelcoverimageurl from (
- select ROW_NUMBER()over(partition by t1.channelid order by t1.time desc)as num,t1.channelid,t2.tagentsid,t1.count,t2.channelcoverimageurl,
- t3.fbrand,t3.saleprodclass
- from tlive_usercount t1
- inner join tlive t2 on t1.channelid=t2.channelid --and t2.livestatus='live'
- inner join tagents t3 on t2.siteid=t3.siteid and t2.tagentsid=t3.tagentsid
- where t2.tactivityid=$tactivityid$
- )t where t.num=1
|