Most-loved askers (least downvotes on questions as a percentage of total reputation)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 200
 Posts.OwnerUserId AS [User Link],
 Users.Reputation,
 sum(CASE WHEN Votes.VoteTypeId = 3 THEN 1 ELSE 0 END) AS [Downvotes For This User's Questions],
 FORMAT(sum(CASE WHEN Votes.VoteTypeId = 3 THEN 1 ELSE 0 END) * 100.0 / Users.Reputation, '##0.###', 'en-us') AS [Downvotes As Percentage Of Reputation]
 
FROM

 Posts
     LEFT JOIN Votes ON Votes.PostId = Posts.Id AND Votes.VoteTypeId = 3
     JOIN Users ON Users.Id = Posts.OwnerUserId
 
WHERE Posts.PostTypeId = 1
    AND Users.Reputation >= ##MinimumReputation?1000##
    AND EXISTS(
      SELECT Posts.OwnerUserId
      FROM Posts
      WHERE Posts.OwnerUserId = Users.Id
        AND Posts.PostTypeId = 1
      GROUP BY Posts.OwnerUserId
      HAVING COUNT(Posts.OwnerUserId) >= ##MinimumQuestions?5##
    )

GROUP BY Posts.OwnerUserId, Users.Reputation

HAVING sum(CASE WHEN Votes.VoteTypeId = 3 THEN 1 ELSE 0 END) >= ##MinimumDownVotes?0##

 
ORDER BY [Downvotes As Percentage Of Reputation] ASC, Users.Reputation DESC

Enter Parameters

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