Posts by week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

SELECT 
  datepart(week,CreationDate) as [date],
  Name,
  count(*) N
FROM Posts
     join PostTypes pt on PostTypeId = pt.Id
WHERE 
  PostTypeId in (1,2) AND 
  CreationDate BETWEEN '##from?2014-01-01##' AND '##to?2014-12-31##'
  and ClosedDate is null
GROUP BY 
  datepart(week,CreationDate), 
  Name 
ORDER BY 
  datepart(week,CreationDate),
  Name

Enter Parameters

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