SELECT TOP 100 Users.Id, DisplayName, Count(Posts.Id) AS ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT 
    TOP 100
    Users.Id,
    DisplayName,
    Count(Posts.Id) AS Answers,
    AVG(CAST(Score AS float)) AS AverageAnswerScore
FROM
    Posts
  INNER JOIN
    Users ON Users.Id = OwnerUserId
WHERE 
    PostTypeId = 2
GROUP BY
    Users.Id, DisplayName
HAVING
    Count(Posts.Id) > 100
ORDER BY
    AverageAnswerScore DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached