Count of self-answers on a specific tag, record holders

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Apps

Q&A for apps, scripts, and development with the Stack Exchange API

SELECT TOP 100
  MIN(Tags.TagName) AS TagName,
  Q.OwnerUserId AS [User Link],
  COUNT(*) AS Count
FROM Posts Q, Posts A, PostTags, Tags
WHERE
  A.ParentId = Q.Id
  AND
  PostTags.PostId = Q.Id
  AND
  Q.OwnerUserId > 0
  AND
  Q.OwnerUserId = A.OwnerUserId
  AND
  Tags.Id = PostTags.TagId
GROUP BY
  PostTags.TagId, Q.OwnerUserId
ORDER BY Count DESC, Q.OwnerUserId

Enter Parameters

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