Questions Per Day Over Specific Time Period

2

Please login or register to vote for this query.

(click on this box to dismiss)

The Great Outdoors

Q&A for people who love being outdoors enjoying nature and wilderness, and learning about the required skills and equipment

SELECT 
  COUNT(Id) as NumPosts,
  DATEDIFF(dd,MIN(CreationDate),MAX(CreationDate)) as NumDays,
  ROUND(CAST(COUNT(Id) AS FLOAT) / CAST(DATEDIFF(dd,(GETDATE() - ##DaysAgo:int?365##),GETDATE()) as FLOAT),2) as QPD
FROM Posts

WHERE
  PostTypeId = 1 AND
  CreationDate >= GETDATE() - ##DaysAgo##

Enter Parameters

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