Question per Day on StackExchange

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics Meta

Q&A about the site for professional robotic engineers, hobbyists, researchers and students

SELECT

Date AS [Dates],
ROUND((SUM(pd.Questions) * 1.00 / COUNT(pd.Date)),2) 
--datepart(dayofyear,getDate())
AS [Questions per Day]
FROM
(

SELECT 

SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS [Questions],
CAST(p.CreationDate AS Date) AS [Date]
FROM Posts  AS p
GROUP BY CAST(p.CreationDate AS Date)
) AS pd

GROUP BY Date
ORDER BY Date DESC

Enter Parameters

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