What is my accepted answer percentage rate

0

Please login or register to vote for this query.

(click on this box to dismiss)

On avg how often are answers I give, accepted

Android Enthusiasts Meta

Q&A about the site for enthusiasts and power users of the Android operating system

-- What is my accepted answer percentage rate
-- On avg how often are answers I give, accepted

DECLARE @UserId int = ##UserId##

SELECT 
--u.DisplayName as username,
    (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 q.OwnerUserId = u.Id
    
WHERE
    a.OwnerUserId = @UserId
  AND
    a.PostTypeId = 2
--GROUP BY u.DisplayName

Enter Parameters

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