--cuo
SELECT COUNT(*) FROM
(
SELECT SP.FID FROM TServiceProject SP WHERE SP.FID NOT IN (SELECT T.FServiceProjectID FROM TZwFkxx T/*,TServiceProject SP WHERE SP.FID=T.FSERVICEPROJECTID GROUP BY T.FSERVICEPROJECTID*/)
)
--ok
SELECT COUNT(*) FROM
(
SELECT SP.FID FROM TServiceProject SP WHERE SP.FID NOT IN (SELECT T.FServiceProjectID FROM TZwFkxx T,TServiceProject SP WHERE SP.FID=T.FSERVICEPROJECTID GROUP BY T.FSERVICEPROJECTID)
)