Users previous names based on their edit history

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  UserId, UserDisplayName,
  COUNT(*) OVER (PARTITION BY UserId) AS No
FROM (
  SELECT DISTINCT UserId, UserDisplayName
  FROM PostHistory
  WHERE UserId IS NOT NULL AND UserDisplayName IS NOT NULL
  ) p
ORDER BY No DESC, UserId

Enter Parameters

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