Find Employees With Multiple Managers Listed
Here is one approach

WITH DuplicateManagers
AS (
    SELECT empid
        ,count(*) AS rcount
    FROM #DuplicationIdentifier
    GROUP BY empid
    HAVING count(*) &gt; 1
    )
SELECT a.empid
    ,a.managerid
FROM #DuplicationIdentifier a
JOIN DuplicateManagers b ON b.empid = a.empID
ORDER BY a.empid