How much rep would I have if there were no rep cap? [FIXED]

By Joel Coehoorn in this answer: http://meta.stackoverflow.com/questions/42121/is-there-a-script-tool-to-calculate-the-rep-as-if-there-were-no-cap
Edited to use a specified User ID.

Q&A for professionals and students of engineering

-- How much rep would I have if there were no rep cap?
-- By Joel Coehoorn in this answer: http://meta.stackoverflow.com/questions/42121/is-there-a-script-tool-to-calculate-the-rep-as-if-there-were-no-cap
-- Edited to use a specified User ID.
DECLARE @UserId int = ##UserId##
SELECT SUM(Case When VoteTypeID = 1 Then 15 WHEN VoteTypeID=2 THEN 10 WHEN VoteTypeID=3 THEN -2 ELSE 0 END)
FROM Votes v
INNER JOIN Posts p ON p.ID = v.PostID
WHERE p.OwnerUserID = @UserID AND p.CommunityOwnedDate IS NULL