Top 100 posts with the best anonymous/low-rep feedback

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

SELECT TOP 100 SUM(CASE WHEN f.VoteTypeId = 2 THEN 1 ELSE -1 END) AS Score,
               SUM(CASE WHEN f.VoteTypeId = 2 THEN 1 ELSE 0 END) AS Helpful,
               SUM(CASE WHEN f.VoteTypeId = 3 THEN 1 ELSE 0 END) AS Unhelpful,
               f.PostId AS [Post Link],
               p.OwnerUserId AS [User Link]
FROM   PostFeedback f
       INNER JOIN Posts p
         ON p.Id = f.PostId
WHERE  f.VoteTypeId IN (2, 3)
GROUP  BY f.PostId, p.OwnerUserId
ORDER  BY Score DESC

Enter Parameters

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