Top #100 with +200 Answers for specific tag

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

select top 200
      ROW_NUMBER() OVER(order by sum(case votetypeid 
             when 2 then 1 
             when 3 then -1
             end) desc) AS [# Rank],
       p.owneruserid AS [User Link]
       , (select count(distinct sub_p.id) AS Answers from posts sub_p
            inner join posttags sub_pt on sub_pt.postid = sub_p.parentid
            inner join tags sub_t on sub_t.id = sub_pt.tagid 
            where sub_p.OwnerUserId = p.owneruserid
            and sub_t.tagname = ##tagname:string?angular##) AS [# Answers]
       , sum(case votetypeid 
             when 2 then 1 
             when 3 then -1
             end) AS [Score]
       , sum(case votetypeid 
             when 2 then 10 
             when 3 then -2
             end) [Reputation]
from posts p
inner join posttags pt on pt.postid = p.parentid
inner join tags t on t.id = pt.tagid
inner join votes v on v.postid = p.id
where t.tagname = ##tagname:string?angular##
group by p.owneruserid
having count(distinct p.id) >= 100
order by sum(case votetypeid 
             when 2 then 1 
             when 3 then -1
             end) desc

Enter Parameters

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