Posts per week

1

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

select year, week, count(*) as posts, 
       sum(ViewCount) as views, sum(AnswerCount) as answers, sum(CommentCount) as comments 
from 
(select datepart(year, Posts.CreationDate) as year, 
datepart(week, Posts.CreationDate) as week, Posts.Id, ViewCount, AnswerCount,
CommentCount from Posts
join Users on Posts.ownerUserId =  Users.Id
where (upper(Users.Location) like upper('%New Zealand%')
or upper(Location) = upper('nz')
or upper(Location) like upper('NZ,%')
or upper(Location) like upper('%,NZ'))
and Posts.CreationDate >='2017-01-01') T0
group by year, week
Order by year, week;

Enter Parameters

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