Users with more than 10 duplicate accounts

0

Please login or register to vote for this query.

(click on this box to dismiss)

A list of users that have more than 10 duplicate account on site, base on the EmailHash

Amateur Radio Meta

Q&A about the site for amateur radio enthusiasts

-- Users with more than 10 duplicate accounts
-- A list of users that have more than 10 duplicate account on site, base on the EmailHash

SELECT 
    u1.EmailHash,
    Count(u1.Id) AS Accounts,
    (SELECT Cast(u2.Id AS varchar) + ' (' + u2.DisplayName + '), ' FROM Users u2 WHERE u2.EmailHash = u1.EmailHash ORDER BY u2.DisplayName 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

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results