Gold tag badge race

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

-- copied from http://data.stackexchange.com/math/query/169456/gold-tag-badge-races
-- 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

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