SELECT V.VendorName,
count(employeeID) as ConsultantCount
FROM Employee E,
Project P,
Vendors V
WHERE E.ProjectID = P.ProjectID
AND P.VendorID = V.VendorID
AND (P.Enddate IS NULL
OR P.EndDate >= Convert(date,getdate()))
AND E.PlacementType=1 group by VendorName