SELECT TOP 100 a.OwnerUserId, a.OwnerDisplayName, ( CAST(...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

SELECT TOP 100
    a.OwnerUserId,
    a.OwnerDisplayName,
    (
    CAST(Count(a.Id) AS float)
     /
    ((SELECT Count(*) 
     FROM Posts 
     WHERE OwnerUserId = a.OwnerUserId 
       AND PostTypeId = 2)+1)
    * 100) AS AcceptedPercentage
FROM
    Posts q
  INNER JOIN
    Posts a ON q.AcceptedAnswerId = a.Id

WHERE a.PostTypeId = 2

GROUP BY a.OwnerUserId,a.OwnerDisplayName

ORDER BY AcceptedPercentage DESC

Enter Parameters

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