Users.AccountId duplications

1

Please login or register to vote for this query.

(click on this box to dismiss)

Lists the Users.AccountIds having the same UsersId on the site

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

SELECT
  'https://stackexchange.com/users/' + CAST(AccountId AS VARCHAR(MAX)) +
    '?tab=accounts|Network profile' AS [Network profile],
  STRING_AGG(CAST(Id AS VARCHAR(MAX)), ', ') AS UserIds,
  STRING_AGG(DisplayName, ', ') AS UserNames,
  AccountId,
  COUNT(*) AS Count
FROM Users
WHERE AccountId IS NOT NULL
GROUP BY AccountId
HAVING COUNT(*) > 1
ORDER BY Count DESC, AccountId DESC

Enter Parameters

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