Jon Skeet answers per month

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

with answersWithMonth as
(
    select
      p.ownerUserId,
      DATEADD(month, DATEDIFF(month, 0, creationDate), 0) month
    from
      posts p
    where 
      postTypeId = 2 --answer
)
select
  a.month, count(*) 
from
  answersWithMonth a
  inner join users u on u.id = a.ownerUserId
where
  u.id = 22656 -- J Skizzle
group by
  a.month
order by
  a.month

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results