Most controversial posts on the site


Please login or register to vote for this query.

(click on this box to dismiss)

Looks for posts with more than half the amount of downvotes as they have upvotes Ordered by upvotes

Stack Overflow

Q&A for professional and enthusiast programmers

set nocount on 

declare @VoteStats table (PostId int, down int) 

insert @VoteStats
    down = sum(case when VoteTypeId = 3 then 1 else 0 end)
from Votes
where VoteTypeId in (3)
group by PostId

set nocount off

select top 100 as [Post Link] , down from @VoteStats 
join Posts p on PostId = p.Id
where down > 10 and p.CommunityOwnedDate is null and p.ClosedDate is null

Enter Parameters

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