My downvoted posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lists all of your posts that have received any downvotes, sorted by number of downvotes.

Biology

Q&A for biology researchers, academics, and students

SELECT p.Id     AS [Post Link],
       SUM(CASE WHEN v.VoteTypeId = 3 THEN 1 ELSE 0 END) AS Downvotes,
       SUM(CASE WHEN v.VoteTypeId = 2 THEN 1 ELSE 0 END) AS Upvotes       
FROM   Posts p
       INNER JOIN Votes v
         ON p.Id = v.PostId  
WHERE  p.OwnerUserId = ##UserId:int##
GROUP  BY p.Id
HAVING SUM(CASE WHEN v.VoteTypeId = 3 THEN 1 ELSE 0 END) > 0
ORDER  BY Downvotes DESC

Enter Parameters

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