Users by downvote ratio

1

Please login or register to vote for this query.

(click on this box to dismiss)

Open Data

Q&A for developers and researchers interested in open data

SELECT TOP ##TopN:int?100##
  Posts.OwnerUserId AS [User Link],
  COUNT(DISTINCT Posts.Id) AS Posts,
  COUNT(*) - COUNT(CASE WHEN Votes.VoteTypeId = 3 THEN 1 END) AS Ups,
  COUNT(CASE WHEN Votes.VoteTypeId = 3 THEN 1 END) AS Downs,
  100.0 * COUNT(CASE WHEN Votes.VoteTypeId = 3 THEN 1 END)
  / COUNT(*) AS DownPct
FROM Posts, Votes
WHERE
  Votes.PostId = Posts.Id
  AND
  Votes.VoteTypeId BETWEEN 2 AND 3
  AND
  Posts.OwnerUserId > 0
GROUP BY Posts.OwnerUserId
HAVING COUNT(DISTINCT Posts.Id) >= ##MinPosts:int?10##
ORDER BY DownPct DESC, Posts.OwnerUserId

Enter Parameters

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