Bounties Won

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @UserId int = ##UserId##

SELECT 
  Posts.OwnerUserId As [User Link], COUNT(*) As BountiesWon
FROM Votes
  INNER JOIN Posts ON Votes.PostId = Posts.Id
WHERE
  VoteTypeId=9
  and OwnerUserId=@UserId
GROUP BY
  Posts.OwnerUserId
ORDER BY
  BountiesWon DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results