求助 这sql怎么写?????????????????????

select 'notcanceled' as id, 'recordId' as pId, c.catalog, count(c.catalog) as cCount,

'计数('+cast(count(c.catalog) as varchar(10))+')' as name , 'false' as [open]

from (
select record_id, logout_flag,r.catalog_id, '否' as catalog
from [elePermit].dbo.permit_catalog c
left join [dbo].[generate_record] r
on c.catalog_id=r.catalog_id
where c.original_flag = '正本'
and r.logout_flag = '否'
) as c
group by c.catalog


from里查询没有数据,但是我想让count显示0
怎么改???

图片说明

count(isnull(c.catalog,0)) as cCount

select 'notcanceled' as id, 'recordId' as pId, c.catalog, count(isnull(c.catalog,0)) as cCount,

'注销('+cast(count(isnull(c.catalog,0)) as varchar(10))+')' as name , 'false' as [open]

from (
select record_id, logout_flag,r.catalog_id, '注销' as catalog

from [elePermit].dbo.permit_catalog c
left join [dbo].[generate_record] r
on c.catalog_id=r.catalog_id
where c.original_flag = '正本'
and r.logout_flag = '注销'
) as c

         group by c.catalog
        不行啊
        ![图片说明](https://img-ask.csdn.net/upload/201710/09/1507511363_412670.jpg)
 isnull(count(c.catalog),0) as cCount