Gold tag badge race


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- copied from
-- before I knew it was possible to switch sites on a query...
select ROW_NUMBER() over (order by sum(Score) desc) as [Rank],
       OwnerUserId as [User Link],
       u.DisplayName as [Name For Sort],
       TagName as [TagName],
       sum(Score) as [Tag Score],
       count(p.Id) as [Tag Count]
from Posts p, Tags t, PostTags pt, Users u
where pt.PostId = p.ParentId
  and pt.TagId = t.Id
  and u.Id = p.OwnerUserId
  and p.PostTypeId = 2
  and CommunityOwnedDate is null
  and u.Reputation > 4000
group by OwnerUserId, TagName, u.DisplayName
having sum(score) > 80
order by sum(Score) desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results