Questions per week

0

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

select dateadd(week, datediff(week, 0, creationdate), 0),
  count(*) as 'Total',
  count(coalesce(closeddate, deletiondate)) AS 'Closed / Deleted',
  count(*) - count(coalesce(closeddate, deletiondate)) AS 'Open',
  70 as '10 QPD'
  from postswithdeleted
  where creationdate >= ##startDate:string?2018-01-01##
    and posttypeid = 1
  group by dateadd(week, datediff(week, 0, creationdate), 0)
  order by dateadd(week, datediff(week, 0, creationdate), 0)

Enter Parameters

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