Group COUNT by month less than variable
Your not exists sub-query doesn't work. It will always return a 1 if ANY employee exists that has a null statusChangeEndDate or that meets the criteria you are testing so basically will always exist. To continue using a Not Exists you'd need to make it correlated sub-query by adding e.employeeID = emp.employeeID so it is checking to see if that employee doesn't have a null record or a record for later than this year. Doing it that way probably wouldn't scale well for performance as the correlated sub-query needs to be run for every line in the results.

You could change it to 

e.employeeid not in ( select emp.employeeid from Employee emp
join EmployeeStatus emps on emp.employeeID = emps.employeeID
        where
        (emps.statusChangeEndDate is null or
             (year(emps.statusChangeEndDate) = @year
               and month(emps.statusChangeEndDate) &gt; @month))


Your attempt at SQL seems to have more criteria than your description as it is including people that have nothing in the EmployeeStatus table (left join and is null) and is trying to exclude people who have a change end date after the entered date or have a null change end date. That is subtly different than finding people who have a change end date before your entered date since people can have multiple changes.