Users with the most posts above a score of N.

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @minScore numeric = ##MinScore?100##

SELECT TOP 50
    Posts.OwnerUserId AS [User Link],
    Count(Posts.Score) AS [Count],
    Sum(Posts.Score) AS [Total Score]
FROM Posts
WHERE
    Posts.Score >= @minScore and
    Posts.PostTypeId <= 2 and
    Posts.OwnerUserId is not null
GROUP BY Posts.OwnerUserId
ORDER BY [Count] DESC, [Total Score] DESC

Enter Parameters

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