Hello

0

Please login or register to vote for this query.

(click on this box to dismiss)

Game Development Meta

Q&A about the site for professional and independent game developers

-- Hello
-- Enter Query Description
DECLARE @UserId int = ##UserId##

SELECT TOP 20 
    Posts.PostTypeId,
    COUNT(*) AS UpVotes 
FROM Posts
    INNER JOIN Votes ON Votes.PostId = Posts.Id and VoteTypeId = 2
WHERE 
    Votes.UserId = @UserId
    AND Posts.CommunityOwnedDate IS NULL
GROUP BY Posts.PostTypeId
ORDER BY UpVotes DESC

Enter Parameters

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