% of accepted, open, questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

IT Security Meta

Q&A about the site for information security professionals

select datepart(yyyy, creationdate) as [Year]
     , datepart(q, creationdate) as [Quarter]
     , sum(case when acceptedanswerid is not null then 1 else 0
           end ) as [Accepted]
     , sum(case when acceptedanswerid is null then 1 else 0
           end ) as [Not Accepted]
     , round(cast(count(acceptedanswerid) as float )
             / cast(count(*) as float)
             , 3) as [Accept Rate]
  from posts
 where posttypeid = 1
   and closeddate is null
   and answercount > 0
 group by datepart(yyyy, creationdate)
        , datepart(q, creationdate)
 order by datepart(yyyy, creationdate)
        , datepart(q, creationdate)

Enter Parameters

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