WITH PostTagsAggregate AS ( SELECT t.TagName, t.[Count] F...

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 PostTagsAggregate AS (
  SELECT 
    t.TagName,
    t.[Count]
  FROM
    Tags t
  JOIN PostTags pt
    ON pt.TagId = t.Id
  JOIN Posts p
    ON pt.PostId = p.Id
  GROUP BY
    t.TagName,
    t.[Count]
)
SELECT
  pta.*
FROM
  PostTagsAggregate AS pta
ORDER BY
  pta.[Count] DESC

Enter Parameters

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