Top Users per Country & Tag by Tag Reputation (October 2018)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

SELECT us.id [User Link],
       us.DisplayName [Name],
       us.Reputation,
       tuser.Score [Tag Score],
       tuser.Answers [Tag Answers]
        
FROM Users us

JOIN 
(SELECT
  Answers.OwnerUserId AS UserId,
  SUM(Answers.Score) AS Score,
  COUNT(*) AS Answers
     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 Tags.TagName = '##TagName##'
  GROUP BY Answers.OwnerUserId
) tuser ON tuser.UserId = us.Id

WHERE
  LOWER(us.Location) like Lower('##Country?Austria##') AND
  Reputation > ##MinimumReputation:int?1701## AND
  Answers >= ##MinimumAnswers:int?100##
ORDER BY Reputation DESC


-- Inspired by https://data.stackexchange.com/stackoverflow/query/324509/top-users-per-country-tag-improved

Enter Parameters

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