I am running the following
Select count (b.confirm_cd) cd_Instances,A.EID,A.Firstname, A.LastName, b.Agent_Login, A.AgentOrg from Prod.Employee A
left outer join Prod.CAPTURE_DETAILS b
on a.AgentID=b.Agent_ID
Where b.date>'2022-07-31'
group by A.EID, A.Firstname, A.LastName, b.Agent_Login, A.AgentOrg order by cd_Instances asc
The b.date does not exist in Prod.Employee, therefore I only return results for agents which exist in the capture details table. This works correctly without the where clause but I need to be able to filter by date and still receive the results with a null count in capture details.