Discord Questions

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 DATEPART(YEAR, P.CreationDate) AS PostYear,
       DATEPART(MONTH, P.CreationDate) AS PostMonth,
       COUNT(*) AS Posts
FROM dbo.PostsWithDeleted P
     JOIN dbo.PostTags PT ON P.ID = PT.PostID
     JOIN dbo.Tags T ON PT.TagID = T.ID
WHERE T.TagName LIKE '%discord%'
  AND P.CreationDate >= '20171001'
GROUP BY DATEPART(YEAR, P.CreationDate),
         DATEPART(MONTH, P.CreationDate)
ORDER BY PostYear,
         PostMonth;
         
SELECT T.TagName AS Tag,
       DATEPART(YEAR, P.CreationDate) AS PostYear,
       DATEPART(MONTH, P.CreationDate) AS PostMonth,
       COUNT(*) AS Posts
FROM dbo.PostsWithDeleted P
     JOIN dbo.PostTags PT ON P.ID = PT.PostID
     JOIN dbo.Tags T ON PT.TagID = T.ID
WHERE T.TagName LIKE '%discord%'
  AND P.CreationDate >= '20171001'
GROUP BY T.TagName,
         DATEPART(YEAR, P.CreationDate),
         DATEPART(MONTH, P.CreationDate)
ORDER BY PostYear,
         PostMonth,
         T.TagName;

Enter Parameters

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