Top % Users for specified tag


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]

Cognitive Sciences Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

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

  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
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

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