number of active users per month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Blender Meta

Q&A about the site for people who use Blender to create 3D graphics, animations, or games

select Months, 
    (case when n_posts > 5 then 'n>5'
          when n_posts > 1 then '5>=n>1' 
          else 'n=1' end),
    count(n_posts) from
(
select Count(Id) as n_posts ,
       1.000*datepart(year,CreationDate)+
         1.000*datepart(month,CreationDate)/12 -
         1.000/24 as Months, 
       OwnerUserId 
from PostsWithDeleted
where PostTypeId in (2) and 
      (1.000*datepart(year,CreationDate)+1.000*datepart(month,CreationDate)/12 < 
      1.000*datepart(year, GETDATE())+1.000*datepart(month, GETDATE())/12)
Group By OwnerUserId, 
1.000*datepart(year,CreationDate)+1.000*datepart(month,CreationDate)/12 - 1.000/24
) a
group by Months,    (case when n_posts > 5 then 'n>5'
          when n_posts > 1 then '5>=n>1' 
          else 'n=1' end)
order by Months

Enter Parameters

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