Per-day questions, votes, answers, views

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

DECLARE @DATE datetime = CAST(##DATE:string?2013-10-20## AS datetime);

SELECT 
  ('http://math.stackexchange.com/q/'+CAST(p.Id AS varchar)+'|#'+CAST(p.Id AS varchar)) as 'Post ID', 
  COUNT(pfb.PostId), 
  p.CreationDate 'Post creation time' 
FROM PostFeedback pfb LEFT JOIN Posts p ON pfb.PostId = p.Id
WHERE
  pfb.CreationDate > @DATE AND pfb.CreationDate < DATEADD(DAY, 1, p.creationDate)
  AND pfb.VoteTypeId IN (2,3)
  AND p.CreationDate > @DATE AND p.CreationDate < DATEADD(DAY,1,@DATE)
  AND p.PostTypeId = 1
GROUP BY p.Id, p.CreationDate
ORDER BY 'Post ID' ASC

Enter Parameters

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