Number of unique users on Answers posted per month for a given tag and time duration


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 count(DISTINCT temp_p.OwnerUserId) AS USERS,
       DATENAME(mm, temp_p.CreationDate) AS MONTH_NAME,
       DATENAME(yyyy, temp_p.CreationDate) AS YEAR,
       MONTH(temp_p.CreationDate) AS MONTH_NUM
select  p2.OwnerUserId, p2.CreationDate
  from  Posts p2, PostTypes ptypes2 
 where  p2.posttypeid =
   and  p2.CreationDate >= '##startdate##'
   and  p2.CreationDate <= '##enddate##'
   and = 2
   and  p2.parentid in
     (  select
          from  Posts p3, PostTags ptags3, Tags t3, PostTypes ptypes3 
         where  p3.posttypeid =
           and = 1
           and = ptags3.postid 
           and  ptags3.tagid = 
           and  t3.tagname = '##TagName##'
) temp_p
group by DATENAME(yyyy, temp_p.CreationDate), MONTH(temp_p.CreationDate), DATENAME(mm, temp_p.CreationDate)
order by DATENAME(yyyy, temp_p.CreationDate) ASC, MONTH(temp_p.CreationDate) ASC, DATENAME(mm, temp_p.CreationDate) ASC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results