SELECT DATEPART(wk, q.CreationDate) AS [WEEK], SUM(q.View...

1

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics Meta

Q&A about the site for people studying math at any level and professionals in related fields

SELECT 
  DATEPART(wk, q.CreationDate) AS [WEEK],
  SUM(q.ViewCount), SUM(q.AnswerCount),  SUM(q.CommentCount)
  -- MEDIAN(q.Score,
FROM Posts q
INNER JOIN PostTags pt ON q.Id = pt.PostId
INNER JOIN Tags t ON pt.TagId = t.Id
WHERE (q.PostTypeId=1)
---only questions (although answers do not have tags, so this is not necessary)
--  AND (t.TagName in ('oracle','oracle-cloud-infrastructure')) 
  AND (t.TagName in ('oracle-cloud-infrastructure')) 
  and q.CreationDate < '2021-12-01'
  and q.CreationDate >= '2021-11-01'
-- GROUP BY t.TagName;
GROUP BY DATEPART(wk, q.CreationDate)
ORDER BY DATEPART(wk, q.CreationDate) ASC;

Enter Parameters

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