.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computer Science Educators

Q&A for those involved in the field of teaching Computer Science

select 
  year(creationdate) yr,
 --  sum( case when posttypeid=1 then 1 else 0 end ) Q,
 --  sum( case when posttypeid=2 then 1 else 0 end ) A,
 -- format(1.0*sum( case when posttypeid=2 then 1 else 0 end )/sum( case when posttypeid=1 then 1 else 0 end ),'0.0') apq
  (1.0*sum( case when posttypeid=2 then 1 else 0 end )/sum( case when posttypeid=1 then 1 else 0 end )) apq
from posts p
where posttypeid in (1,2)
group by year(creationdate)
order by year(creationdate)

Enter Parameters

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