questions per week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

with Weekly as (
    select dateadd(dd, 1 - datepart(dw, CreationDate), 
           cast(CreationDate as Date)) as Week,
           count (*) WeekCount
    from Posts 
    where postTypeId = 1
    group by dateadd(dd, 1 - datepart(dw, CreationDate), 
             cast(CreationDate as Date))
)
select Week,
       WeekCount
       --, sum(WeekCount) over (order by Week rows 10000 preceding) as Cumulative
from Weekly
order by Week

Enter Parameters

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