Generalist Progression #updated

4

Please login or register to vote for this query.

(click on this box to dismiss)

So I know what needs to be done, with tag popularity included (all 40 tags)

Stack Overflow

Q&A for programmers

-- Generalist Progression
-- So I know what needs to be done
-- with tag popularity included

declare @temp table (id int identity(1,1), TagName char(128), score int, tagPopularity int);

with tags40 as (
  select top 40 tagid, count(*) as postCount from posttags group by tagid order by count(*) desc
),

answers as (
  select score, id, parentId from posts  -- find responses of questions
  where communityowneddate is null   -- which are non-comm-wiki
  and posttypeid = 2                 -- answers
  and owneruserid = ##UserId##       -- by you
)

insert @temp(TagName, score, tagPopularity) 
select t.TagName, sum(a.score) as score, f.postCount from answers a
inner join posttags pt on pt.postid = a.parentId -- find tags of your answers
right outer join tags40 f on f.tagid = pt.tagid        -- which are one of the top 40s
inner join tags t on f.tagid = t.id
group by t.tagname, f.postCount
order by score desc

select *, case when score >= 15 and tagPopularity >=200 then '' else '!' end from @temp

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached