SELECT users.id, users.name, users.scoreSum FROM (SELECT ...

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 users.id, users.name, users.scoreSum FROM
  (SELECT a.OwnerUserId AS id, u.DisplayName AS name, SUM(a.Score) AS scoreSum FROM
   Tags t
   INNER JOIN PostTags AS pt ON t.Id=pt.TagId
   INNER JOIN Posts AS q ON pt.PostId=q.Id
   INNER JOIN Posts AS a ON q.Id=a.ParentId
   INNER JOIN Users AS u ON a.OwnerUserId=u.Id
   WHERE t.TagName LIKE '##tag##'
   GROUP BY a.OwnerUserId, u.DisplayName
  ) AS users
WHERE users.scoreSum >= 5
ORDER BY users.scoreSum DESC;

Enter Parameters

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