摘要:
SELECT p.* , CASE WHEN u.tongji IS null THEN 0 ELSE u.tongji ENDFROM dbo.AS_Project AS p LEFT JOIN ( SELECT COUNT(0) AS tongji , ProjectId FROM dbo.AS_Url WHERE ProjectId IN ( SELECT id FROM dbo.AS_Project ) GROUP BY ProjectId ) AS u ON p.id = u.ProjectId 阅读全文