Find A Stack Overflow User's (with user-links) Score For One Particular Tag - Globally

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT
    *
    
    FROM
(
select ROW_NUMBER() OVER (ORDER BY tuser.Tag_Score desc) AS User_Rank_On_Tag,
        (PERCENT_RANK( ) OVER(ORDER BY tuser.Tag_Score desc) * 100) AS [TOP_%],
        us.Id [User Link], 
        us.Reputation, 
        us.DisplayName, 
        us.Location, 
        tuser.Tag_Score
from Users us

JOIN 
(SELECT Answers.OwnerUserId AS UserId, SUM(Answers.Score) AS Tag_Score
     FROM Tags 
    JOIN PostTags ON Tags.Id = PostTags.TagId
    JOIN Posts ON Posts.Id = PostTags.PostId  
    JOIN Posts Answers ON Answers.ParentId = Posts.Id 
    WHERE UPPER(Tags.TagName) = UPPER('##TagName##')
  GROUP BY Answers.OwnerUserId
) tuser ON tuser.UserId = us.Id

) a

where UPPER(a.DisplayName) like UPPER('%##DisplayName##%')
order by a.Tag_Score desc, a.Reputation desc

Enter Parameters

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