WITH QuestionsData AS ( SELECT t.TagName, QuestionCount =...

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

WITH QuestionsData AS (
  SELECT 
    t.TagName,
    QuestionCount = 
      t.[Count],
    NetQuesstionScore = 
      SUM(p.Score)
  FROM
    Tags AS t
  JOIN PostTags AS pt
    ON t.Id = pt.TagId
  JOIN Posts AS p
    ON pt.PostId = p.Id
  GROUP BY
    t.TagName,
    t.[Count],
    p.Score
)
SELECT
  *
FROM
  QuestionsData
ORDER BY
  NetQuesstionScore DESC

Enter Parameters

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