Lets you see where you went wrong.
Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more
-- Which of my posts have been downvoted? -- Lets you see where you went wrong. DECLARE @UserId int = ##UserId## SELECT p.Id as [Post Link], (SELECT COUNT(1) FROM Votes v JOIN VoteTypes t ON v.VoteTypeId = t.Id WHERE v.PostId = p.Id AND t.Name = 'UpMod') as Upvotes, (SELECT COUNT(1) FROM Votes v JOIN VoteTypes t ON v.VoteTypeId = t.Id WHERE v.PostId = p.Id AND t.Name = 'DownMod') as Downvotes FROM Posts p WHERE p.OwnerUserId = @UserId ORDER BY Downvotes DESC, Upvotes DESC