Query To Show All Users Who Have Multiple Managers
You just need to use the GROUP BY and the HAVING clause to filter the Table down to only users with multiple managers like so:
SELECT userid
FROM Test
GROUP BY userid
HAVING COUNT(mngrid) &gt; 1

Also I don't think @@Test is valid syntax (though I'm unable to test right now) so my example just uses a regular Table, but you can replace it with your actual Table name.