Select distinct top 100 a.Id, a.Reputation, a.DisplayName...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Patents Meta

Q&A about the site for people interested in improving and participating in the patent system

Select distinct top 100 
a.Id,
a.Reputation,
a.DisplayName,
ROW_NUMBER() OVER ( order by a.Id, a.Reputation, a.DisplayName) as r
FROM Users a, Posts p, Users b, Posts answer, PostTags pt, Tags t
WHERE p.OwnerUserId = a.Id      -- or accountId?
  AND t.TagName = 'r'
  AND answer.OwnerUserId = b.Id -- or accountId
  AND p.PostTypeId = 1          -- question
  AND answer.PostTypeId = 2     -- answer
  AND Pt.PostId = p.id
  AND t.Id = pt.TagId
  AND answer.parentid = p.Id
group by a.Id,a.Reputation, a.DisplayName
order by a.Reputation DESC

Enter Parameters

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