Calculate the single maximum aggregate bounty earned in a single day
Q&A for professionals and students of engineering
-- Bounty hunters -- Calculate the single maximum aggregate bounty earned in a single day SELECT TOP 100 RANK() OVER (ORDER BY SUM(v.BountyAmount) DESC) AS [Rank], u.DisplayName, 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 v.CreationDate,u.DisplayName ORDER BY SUM(v.BountyAmount) DESC