Answer Vote Statistics

1

Please login or register to vote for this query.

(click on this box to dismiss)

Network Engineering

Q&A for network engineers

-- Answer Vote Statistics

DECLARE @UserId int = ##UserId##

SELECT
 Sum(CASE WHEN Score > 0 THEN 1 ELSE 0 END) AS [Upvoted Answers],
 Sum(CASE WHEN Score = 0 THEN 1 ELSE 0 END) AS [Zero Voted Answers],
 Sum(CASE WHEN Score < 0 THEN 1 ELSE 0 END) AS [Downvoted Answers]
FROM
 Posts
WHERE
 OwnerUserId = @UserID AND
 PostTypeId = 2

Enter Parameters

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