select count(2)
from vw_pmcthtdj A
WHERE a.HTBL_ID not in (select jg.jgjs_htid
from PMCTJGJS jg
where jg.JGJS_SFXX = '1'
and jg.jgjs_spzt = '11'
and jg.jgjs_htid = a.HTBL_ID) /*and len(HTBL_TBDWMC)>0*/
and (a.LSXM is null or a.LSXM <> '1') and htbl_tbdwmc like '上海市政建设有限公司%' and htbl_yjjgrq is null