Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
---join with the Users table is redundant here, as the data is already available as a.OwnerUserId ---query without this join: https://data.stackexchange.com/math/query/1263198/users-with-non-cw-answers-in-most-tags SELECT TOP(##num?100##) RANK() OVER(ORDER BY COUNT(DISTINCT pt.TagId) DESC) AS Rank, u.Id AS [User Link], COUNT(DISTINCT pt.TagId) AS [# of tags] FROM Users u INNER JOIN Posts a ON a.OwnerUserId=u.Id INNER JOIN Posts q ON a.ParentId=q.Id INNER JOIN PostTags pt ON pt.PostId=q.Id WHERE (a.CommunityOwnedDate IS NULL) GROUP BY u.Id ORDER BY COUNT(DISTINCT pt.TagId) DESC