1SELECT t1.ks, t1.[# Tasks], COALESCE(t2.[# Late], 0) AS [# Late]
2FROM
3 (SELECT ks, COUNT(*) AS '# Tasks' FROM Table GROUP BY ks) t1
4LEFT JOIN
5 (SELECT ks, COUNT(*) AS '# Late' FROM Table WHERE Age > Palt GROUP BY ks) t2
6ON (t1.ks = t2.ks);
7