Most generalist users

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

WITH Raw AS (
  SELECT A.OwnerUserId AS UserId, PostTags.TagId, SUM(A.Score) AS TagScore
  FROM Posts Q, Posts A, PostTags
  WHERE
    A.ParentId = Q.Id
    AND
    A.CommunityOwnedDate IS NULL
    AND
    PostTags.PostId = Q.Id
    AND
    PostTags.TagId IN (
      SELECT TOP 40 Id
      FROM Tags
      ORDER BY Count DESC, Id
    )
    AND
    A.OwnerUserId >= 1
  GROUP BY
    A.OwnerUserId, PostTags.TagId
)
SELECT
  UserId AS [User Link], UserId, COUNT(*) AS HowGeneralist
FROM Raw
WHERE TagScore >= 15
GROUP BY UserId
ORDER BY HowGeneralist DESC, UserId

Enter Parameters

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