On avg how often are answers I give, accepted
Q&A for scientists using computers to solve scientific problems
-- What is my accepted answer percentage rate -- On avg how often are answers I give, accepted DECLARE @UserId int = ##UserId## SELECT u.DisplayName, Count(a.Id) as Total, (CAST(Count(a.Id) AS float) / (SELECT Count(*) FROM Posts WHERE OwnerUserId = @UserId AND PostTypeId = 2) * 100) AS AcceptedPercentage FROM Posts q INNER JOIN Posts a ON q.AcceptedAnswerId = a.Id inner join users u on a.owneruserid = u.id WHERE a.OwnerUserId = @UserId AND a.PostTypeId = 2 group by u.DisplayName