SELECT *, count(ProjPK) FROM tblEmp WHERE Half = 1 GROUP BY ProjPK
SELECT a.name, a.projId, b.totalProjectMember FROM tblEmp a JOIN (SELECT projId, Count(*) AS totalProjectMember FROM tblEmp GROUP BY projId) b ON a.projId = b.projId
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)