Tag badge status

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping

Q&A for gardeners and landscapers

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

with 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)
select t.TagName, count(a.score) as score from answers a
inner join posttags pt on pt.postid = a.parentId -- find tags of your answers
inner join tags t on pt.tagid = t.id
group by t.tagname
order by score desc

select *, case when score >= 1000 then 'S,G' when score >= 400 then 'S' else '' end from @temp

Enter Parameters

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