User Posts Per Week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Server Fault

Q&A for system and network administrators

SELECT
cast(datepart(week, CreationDate) as varchar(2))  week,
year(creationdate) as year,
COUNT(id)
FROM posts
GROUP BY datepart(week, CreationDate), year(creationdate)
order by year(creationdate) desc, datepart(week, CreationDate) desc

Enter Parameters

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