select s.spacename,count(case when contenttype='PAGE' then contenttype else null end) as 页面, count(case when contenttype='ATTACHMENT' then contenttype else null end) as 附件 from CONTENT c join SPACES s on c.spaceid=s.spaceid JOIN SPACEPERMISSIONS sp ON s.spaceid=sp.spaceid where sp.PERMALLUSERSSUBJECT is null and sp.PERMGROUPNAME is null and sp.PERMUSERNAME is null group by s.spacename; |