Bounty hunters

2

Please login or register to vote for this query.

(click on this box to dismiss)

Calculate the single maximum aggregate bounty earned in a single day

Emacs

Q&A for those using, extending or developing Emacs

-- Bounty hunters
-- Calculate the single maximum aggregate bounty earned in a single day
SELECT TOP 300 RANK() OVER (ORDER BY SUM(v.BountyAmount) DESC) AS [Rank],
u.Id as [User Link], SUM(v.BountyAmount) as Bounties 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.Id
ORDER BY SUM(v.BountyAmount) DESC

Enter Parameters

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