Percentage of accepted answers by month (adjusted)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

Select 43 - Datediff(month, p.CreationDate, Current_Timestamp) as Age,
       convert(DECIMAL(10,2), sum(case when p.AcceptedAnswerId is null then 0
                                       else 1
                                  end)
               ) / count(p.Id) as PercentAccepted
From Posts p
Where p.PostTypeId = 1
and p.Score > 0
and Datediff(month, p.CreationDate, Current_Timestamp) < 45
Group by Datediff(month, p.CreationDate, Current_Timestamp)
Order by Datediff(month, p.CreationDate, Current_Timestamp) desc

Enter Parameters

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