User Answers over time

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 
  COUNT(DISTINCT Answers.Id) AS Answers,
  SUM(Answers.Score) AS Votes,
  SUM(Votes.BountyAmount) AS Bounty
FROM 
  Posts AS Answers
  LEFT JOIN Votes ON (Answers.Id = Votes.PostId)
WHERE 
  Answers.OwnerUserId = @UserId AND 
  Answers.PostTypeId = 2;

Enter Parameters

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