Who are the tag experts?


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Time series of the number of active experts per week
-- Where "active expert" is someone who has posted more than one upvoted answer.
-- Per Deer Hunter's definition in http://meta.stackexchange.com/a/261608/
-- X-axis is in years, so the point at 2015.0 is the first week of 2015.

DECLARE @tag nvarchar(25)

SET @tag = LOWER('##tagName##')

select uid as [User Link]
      (datepart(yy, p.creationdate) + (datepart(wk, p.creationdate)-1) / 52.0) as YR_WK
    , u.id as UID
    , count (*) as NumAnswers
  from users u, posts p, posts q, posttags pt, tags t
        p.owneruserid = u.id
    and p.posttypeid = 2
    and p.score > 0
    and p.ParentId = q.id 
    and q.posttypeid = 1
    and pt.postid=q.id
    and t.id = pt.tagid 
    and t.tagname=@tag
  group by 
     (datepart(yy, p.creationdate) + (datepart(wk, p.creationdate)-1) / 52.0)
    , u.id
) AnsPerUPerWk
where NumAnswers >= ##ExpertNumAnswersPerWeekThreshold:int?2##
and YR_WK = 2015.5

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results