Top % Users for specified tag

1

Please login or register to vote for this query.

(click on this box to dismiss)

"all time" . . . Note that I use "vba>" for tag VBA to include tags like [excel-vba] but exclude tags like [navbar]

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

declare @usercount int = (
select count(uid) from (
  select distinct a.owneruserid uid
  from posts q left join posts a on q.id=a.parentid
  where q.tags like '%vba>%'
    and q.posttypeid=1 and a.posttypeid=2) z
);

select
  rank() over ( order by sum(a.score) desc) as Rank,
  format( (rank() over ( order by sum(a.score) DESC)*1.0 / @usercount),'0.000%') as [Top % of Users],
  a.owneruserid as [User Link],
  sum(a.score) as Score,
  sum(q.viewcount) as Views,
  sum(1) as [# Answers]
from posts q left join posts a on q.id=a.parentid
where q.tags like '%' + ##tagname:string?vba>## + '%'
  and a.posttypeid=2
  and q.posttypeid=1
  and a.owneruserid is not null
  and a.closeddate is null
group by a.owneruserid
order by sum(a.score) desc

-- tag: Enter a partial or complete tag. Consider bracing in <tag>

Enter Parameters

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