Top bounty earners - both answers and questions


Please login or register to vote for this query.

(click on this box to dismiss)

German Language Meta

Q&A about the site for speakers of German wanting to discuss the finer points of the language and translation

SELECT TOP ##num?200## RANK() OVER (ORDER BY SUM(v.BountyAmount) DESC) AS [Rank],  
u.DisplayName, SUM(v.BountyAmount) as Bounties,
SUM(Case When p.PostTypeId=1 Then v.BountyAmount Else 0 End) AS Questions,
SUM(Case When p.PostTypeId=2 Then v.BountyAmount Else 0 End) AS Answers
FROM  Users u INNER JOIN Posts p ON u.Id = p.OwnerUserId
INNER JOIN Votes v ON p.Id = v.PostId
WHERE (v.VoteTypeId = 9)
GROUP BY u.DisplayName
ORDER BY SUM(v.BountyAmount) DESC

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results