Most controversial questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

"Controversy" is determined by number of overlapping votes minus number of non-overlapping votes (that is, MIN(up,down) - ABS(score)). Higher ranks tend towards more equal numbers of up and down votes, and total votes are also significant.

Stack Apps

Q&A for apps, scripts, and development with the Stack Exchange API

SELECT TOP(500)
  p.Id AS [Post Link],
  (CASE WHEN up < down THEN up ELSE down END) - ABS(p.Score) AS Controversy,
  p.Score,
  up AS UpVotes,
  down AS DownVotes,
  p.OwnerUserId AS [User Link],
  p.CreationDate
FROM
  Posts p INNER JOIN (
    SELECT  
      PostId,
      SUM(CASE VoteTypeId WHEN 2 THEN 1 ELSE 0 END) AS up,
      SUM(CASE VoteTypeId WHEN 3 THEN 1 ELSE 0 END) AS down
    FROM Votes GROUP BY PostId) v
  ON p.Id = v.PostId
  WHERE p.PostTypeId = 1
ORDER BY controversy DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results