Check duplicated EmailHashes for Issues

0

Please login or register to vote for this query.

(click on this box to dismiss)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

SELECT 
    u1.EmailHash,
    Count(u1.Id) AS Accounts,
    Sum(u1.Reputation) As [Total Rep],
    Sum(Case When u1.Reputation = 0 Then 1 Else 0 End) As [Zero Rep],
    (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) > 4
ORDER BY 
    [Total Rep] DESC, Accounts DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results