Percent Answered (in SE sites or '% Answered' in Area51 statistics)

0

Please login or register to vote for this query.

(click on this box to dismiss)

SITE HEALTH VALUE from Area51 statistics -> Percentage Answered (http://area51.stackexchange.com/proposals/42810/stack-overflow-in-spanish) --- Percent Answered in SE sites (http://stackexchange.com/sites#percentanswered) ---- Formula: %Answered = (Accepted + Answer_Has_Positive_Score + Closed) / Questions_Including_Closed ---- Source: http://meta.stackexchange.com/a/86976/304899

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

WITH Answers AS (
  SELECT ParentId AS Id, MAX(Score) AS Score
    FROM Posts
   WHERE PostTypeId = 2
   GROUP BY ParentId
)

SELECT
       dateadd(MONTH, datediff(MONTH, 0, Q.CreationDate), 0) Fecha,
       cast(
         -- Respondidas
         sum(IIF(Q.AcceptedAnswerId IS NOT NULL OR  A.Score > 0 OR Q.ClosedDate IS NOT NULL, 1, 0))
         /
         -- Total preguntas
         cast(count(*) as float) * 100
         -- con 2 decimales
         as decimal(18,2)
       ) Porcentaje
  
  from Posts Q
  left OUTER JOIN Answers A
    on Q.Id = A.Id
 where Q.PostTypeId = 1
 group by dateadd(MONTH, datediff(MONTH, 0, Q.CreationDate), 0)
 order by Fecha

Enter Parameters

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