Percent with an accepted answer 1 day after being asked

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select Month, (sum(GotAnswer) / (count(*) + 0.0)) * 100.0 
         [Percent answered in 7 days] from
  (
   select 
   cast(CreationDate as Date) Month, 
   case when exists 
       (
          select 1 from Votes v
          where PostId = AcceptedAnswerId and 
                VoteTypeId = 1 and 
                v.CreationDate < p.CreationDate + 1
          
        ) then 1
        else 0 
        end [GotAnswer]
   from Posts p
   where PostTypeId = 1
   and CreationDate > GETDATE() - 720 
) as X
group by Month
order by Month asc

Enter Parameters

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