Practica

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 u.Id, SUM(rta.Score)
From Tags t INNER JOIN PostTags pt ON (t.Id = pt.TagId)
  INNER JOIN Posts p ON (p.Id = pt.PostId)
    INNER JOIN Posts rta ON (rta.ParentId = p.Id)
      INNER JOIN Users u ON (u.id = p.OwnerUserId)
-- Tags -> Posts Question -> Post Answers -> User
WHERE p.ParentId IS NULL -- p es una pregunta
	AND t.TagName = 'c#'
GROUP BY u.Id
ORDER BY SUM(rta.Score) DESC
OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY

Enter Parameters

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