Q&A about the site for serious players and enthusiasts of poker
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