Q&A about the site for members of the workforce navigating the professional setting
-- Enter Query Title -- Enter Query Description SELECT u1.EmailHash, Count(u1.Id) AS Accounts, (SELECT Cast(u2.Id AS varchar) + ' (' + u2.DisplayName + '), ' FROM Users u2 WHERE u2.EmailHash = u1.EmailHash FOR XML PATH ('')) AS IdsAndNames FROM Users u1 WHERE u1.EmailHash IS NOT NULL GROUP BY u1.EmailHash HAVING Count(u1.Id) > 10 ORDER BY Accounts DESC