110,539
社区成员
发帖
与我相关
我的任务
分享
select c.title as [name],c.id,c.Parent,
(select count(v.id) from videoIPList v where v.class = c.id
and v.addTime<='2018/3/20 9:56:56'
AND ((v.schoolId=178 and v.iplistid in(select id from IPList where schoolid=178
)) or v.userid=-999) and v.addTime >='2011-1-1' and
v.addTime<='2018-3-31 23:59:59' and v.addTime<='2018/3/20 9:56:56') as [count]
from tsys_Class c
order by c.id