Users from tags by score and reputation

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Different

Q&A for power users of Apple hardware and software

-- Users from tags by score and reputation

-- Tags parameter should be passed with string values separeted by , and within '
-- e.g.
-- 'reactjs', 'nodejs', 'typescript'

declare @limit int = ##Limit##;


select top (@limit)
  rank() over (order by sum(answers.score) desc) "Rank",
  users.id "User Link",
  sum(answers.score) as "Score",
  users.reputation as "Reputation",
  users.displayName as "Name",
  users.websiteUrl as "Website url",
  users.emailHash as "Email hash"
from users
join posts answers on (users.id = answers.owneruserid)
join posts parent on (answers.parentid = parent.id)
join posttags on (parent.id = posttags.postid)
where posttags.tagid in (select id from tags where tagname in (##Tags##))
and answers.posttypeid = 2  -- answers only
group by users.id, users.reputation, users.displayName, users.websiteUrl, users.emailHash
order by sum(answers.score) desc

Enter Parameters

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