Total number of views by day posted

1

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

SELECT CAST(p.CreationDate AS DATE) AS [Day],
  SUM(p.ViewCount) AS [Views]
FROM Posts p
WHERE p.PostTypeId=1
---only questions: p.PostTypeId=1
AND p.CreationDate >= '##Date1?2019-01-01##' AND p.CreationDate <= '##Date2?2021-01-01##'
GROUP BY CAST(p.CreationDate AS DATE)
ORDER BY CAST(p.CreationDate AS DATE)

Enter Parameters

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