Comments per week

1

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 year, week, count(*) as comments from
(select datepart(year, Comments.CreationDate) as year, 
datepart(week, Comments.CreationDate) as week, Comments.Id from Comments
join Users on Comments.UserId = 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 Comments.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