Sum of up and down votes for all posts of a given user.
Q&A for professional and enthusiast programmers
DECLARE @UserId INT = ##UserId##;
SELECT COUNT (CASE WHEN pf.VoteTypeId = 2 THEN 1 ELSE NULL END) AS Helpful
, COUNT (CASE WHEN pf.VoteTypeId = 3 THEN 1 ELSE NULL END) AS Unhelpful
FROM PostFeedback pf
JOIN Posts p ON p.Id = pf.PostId
WHERE p.OwnerUserId = @UserId;