Top User-Tags for CV

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select *,
rank() over (partition by TagName order by cnt desc) as rnk 

from (

select
u.DisplayName,
a.OwnerUserId,
t.TagName,
count(*) as cnt

from ( -- only questions
select *
from Posts
where PostTypeId = 1
)  q

left join ( -- tags
select x.*, y.TagName, y.Count
from PostTags x

left join Tags y
on (x.TagId = y.Id)
) t
on (t.PostId = q.Id)

inner join ( --have answer
select *
from Posts
where PostTypeId = 2
) a
on (a.ParentId = q.Id)

left join Users u
on (a.OwnerUserId = u.Id)

group by 
u.DisplayName,
a.OwnerUserId,
t.TagName


) x

order by cnt desc

Enter Parameters

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