Negative vs. Positive Questions over time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Engineering

Q&A for expert programmers interested in professional discussions on software development

Select createYear
  , NumPos * 100.00 / NumQs as PercentPositive
  , NumNeutral * 100.00 / NumQs as PercentNeutral
  , numNeg * 100.00 / NumQs as PercentNegative

FROM
(

  Select
    sum(case when score > 0 then 1 else 0 end) as NumPos,
    sum(case when score = 0 then 1 else 0 end) as NumNeutral,
    sum(case when score >= 0 then 0 else 1 end) as NumNeg,
    year(CreationDate) as CreateYear,
    Count(*) as NumQs
  from Posts where posttypeid = 1
  group by
    year(CreationDate)
) as T
order by CreateYear

Enter Parameters

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