Average scores of last month's questions and answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Server Fault

Q&A for system and network administrators

Select 1 AS No, 'Questions' As [Column], Count(Id) AS Total, AVG(CAST(Score AS float)) AS [Average score], STDEV(Score) AS [Score Std Deviation]
FROM Posts AS Q
WHERE Q.ParentID Is Null AND Q.CreationDate >  DateAdd(m, -1, GETDATE())
UNION Select 2 AS No, 'Answers' As [Column], Count(Id) AS Total, AVG(CAST(Score AS float)) AS Average, STDEV(Score) AS Deviation
FROM Posts AS A
WHERE A.ParentID Is Not Null AND A.CreationDate >  DateAdd(m, -1, GETDATE())

Enter Parameters

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