Users with reputation > 5,000 who posted the least answers

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 100
    Users.Id AS [User Link], 
    Users.DisplayName,
    Users.Reputation,
    SUM(Case when Posts.PostTypeId = 1 then 1 else 0 end) As Questions,
    SUM(Case when Posts.PostTypeId = 2 then 1 else 0 end) As Answers,
    Users.Upvotes,
    Users.Downvotes
FROM Users
inner join Posts on Users.Id = Posts.OwnerUserId
    and (Posts.PostTypeId = 1 OR Posts.PostTypeId = 2)
    and Users.Reputation > 5000
GROUP BY
   Users.Id,
   Users.CreationDate,
   Users.LastAccessDate,
   Users.Reputation,
   Users.DisplayName,
   Users.CreationDate,
   Users.Views,
   Users.Upvotes,
   Users.Downvotes
ORDER BY Answers ASC

Enter Parameters

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