Tags by Quarter

0

Please login or register to vote for this query.

(click on this box to dismiss)

SharePoint

Q&A for SharePoint enthusiasts

SELECT
    t.TagName,
    DatePart(quarter, p.LastActivityDate) AS q,
    Year(p.LastActivityDate) AS y, 
    COUNT(p.Id) As NumPosts
  FROM Posts p
  JOIN PostTags pt ON p.Id = pt.PostId
  JOIN Tags t ON t.Id = pt.TagId
  where Year(p.LastActivityDate) = 2024 and DatePart(quarter, p.LastActivityDate) = 3
  GROUP BY DatePart(quarter, p.LastActivityDate), Year(p.LastActivityDate), t.TagName
  ORDER BY y, q, NumPosts DESC

Enter Parameters

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