Journey to be a Generalist

10

Please login or register to vote for this query.

(click on this box to dismiss)

Based on Q#734, the accepted answer in meta

Server Fault

Q&A for system administrators and IT professionals

-- Journey to be a Generalist
-- Based on Q#734, the accepted answer in meta

with top40 as (
  select top 40 t.id, t.tagname
  from tags t, posttags pt
  where pt.tagid = t.id
  group by t.tagname, t.id
  order by count(pt.postid) desc
),

myanswers as(
  select p.parentid, p.score
  from posts p
  where
    p.owneruserid = ##UserID## and
    p.communityowneddate is null
)

select t40.tagname as 'Tag', sum(p1.score) as 'Score',
case when sum(p1.score) >= 15 then ':-)' else ':-(' end as 'Status'
from top40 t40, myanswers p1, posttags pt1
where
  pt1.postid = p1.parentid and
  pt1.tagid = t40.id
group by t40.tagname
order by sum(p1.score) desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results