Total number of views by month of CreationDate

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

SELECT eomonth(p.CreationDate) [month],
  SUM(p.ViewCount)
FROM Posts p
WHERE p.PostTypeId=1
---only questions: p.PostTypeId=1
AND p.CreationDate >= '##Date1?2015-01-01##' AND p.CreationDate <= '##Date2?2021-01-01##'
GROUP BY eomonth(p.CreationDate)
ORDER BY eomonth(p.CreationDate)

Enter Parameters

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