instruction: Altruistic Bounties Offered Rank by User.
response: WITH RankedUsers AS (SELECT RANK() OVER (ORDER BY SUM(v.BountyAmount) DESC) AS Rank, v.UserId, SUM(v.BountyAmount) AS BountySum FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id AND v.UserId != p.OwnerUserId WHERE VoteTypeId = 8 AND UserId != -1 GROUP BY v.UserId) SELECT Rank, UserId AS "user_link", BountySum FROM RankedUsers WHERE Rank < 100 OR UserId = '##UserId##' ORDER BY Rank