Top bounty earners per tag

1

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

SELECT TOP(##num?500##)
p.OwnerUserId AS [User Link],
t.TagName,
p.OwnerDisplayName,
SUM(bs.BountyAmount) AS [Rep from bounties],
COUNT(bs.BountyAmount) AS [Number of bounties]
FROM Posts p INNER JOIN Votes bs 
  ON (p.Id = bs.PostId) AND (bs.VoteTypeId = 9)  -- BountyClose
  INNER JOIN PostTags pt ON p.ParentId = pt.PostId
  INNER JOIN Tags t ON pt.TagId = t.Id
GROUP BY p.OwnerUserId, p.OwnerDisplayName, t.TagName      
ORDER BY SUM(bs.BountyAmount) DESC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results