数据求和显示,求大神指导。
select DepartmentName,SectionOffice,(select count(*) ShareCount from tblTaskFlowRecord where OperationType in (2,3) and CreateWechatOpenId=c.OpenId group by CreateWechatOpenId) ShareCount--分享量
from (select distinct CreateWechatOpenId from tblTaskFlowRecord) a
join SysUser c on a.CreateWechatOpenId=c.OpenId
left join tblDepartmentRelation d on c.Mobile=d.Phone
怎么把为空的数据统计成一条显示?