Most Accepted Users

1

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

-- Most Accepted Users
Declare @minAnswers int = ##MinAnswers##
select Accepted,Answered,cast(10000*Accepted/Answered as float)/100 as pct,
UserID as [User Link] from
(select count(a.id) as "Answered", count(iif(a.id=q.acceptedAnswerId,a.id,null)) as "Accepted",
u.id as "UserID", u.DisplayName as DisplayName --
from Posts a, Users u, Posts q --
where a.OwnerUserId = u.id and q.PostTypeId = 1 and
a.PostTypeId = 2 and a.ParentId=q.id group by u.id,u.Displayname) t --
where answered >= @minAnswers order by pct desc

Enter Parameters

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