Generalist Progression (see all top 40 tags)

8

Please login or register to vote for this query.

(click on this box to dismiss)

So I know what needs to be done Like the original query, but displays all top 40 tags, and been extended to include tag popularity numbers/ranks so you can see how close tags are to breaking 200 barrier (if they are short).

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

-- Generalist Progression
-- So I know what needs to be done

declare @temp table (Id int identity(1,1), TagName char(128), TagPopularity int, Score int);

with tags40 as (
   select top 40
       ROW_NUMBER() OVER (ORDER BY Count(*) DESC) as popularity,
       tagid
   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 = 31503 --##UserId:int##       -- by you
)

insert @temp(TagName, TagPopularity, Score) 
select t.TagName, f.popularity, sum(a.score) as Score 
from answers a
inner join posttags pt on pt.postid = a.parentId -- find tags of your answers
inner 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.popularity
order by score desc

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

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results