SELECT Avg(Cast(Score AS Float)) AS [Posts], Avg(CASE Pos...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Engineering

Q&A for professionals, academics, and students working within the systems development life cycle

SELECT
    Avg(Cast(Score AS Float)) AS [Posts],
    Avg(CASE PostTypeID WHEN 1 THEN Cast(Score AS Float) END) AS [Questions],
    Avg(CASE PostTypeID WHEN 2 THEN Cast(Score AS Float) END) AS [Answers]
  FROM Posts
  WHERE (PostTypeId = 1 OR PostTypeId = 2)
  AND CreationDate > '1/1/2012'

Enter Parameters

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