COUNT Q+A's FOR USER BY MONTH

1

Please login or register to vote for this query.

(click on this box to dismiss)

Count all Questions and Answers posted by one or more specified users, grouped chronologically by month (excluding closed questions)

Computational Science

Q&A for scientists using computers to solve scientific problems

select 
format(datefromparts(year(creationdate), month(creationdate),1) ,'yyyy-MMM') as YearMonth, 
  sum(case when posttypeid=1 then 1 else 0 end) as [#Questions],
  sum(case when posttypeid=2 then 1 else 0 end) as [#Answers]
  
from 
  posts 
  
where 
  owneruserid in (##UserID##)
  and closeddate is null
  and posttypeid in (1,2)

group by 
  datefromparts(year(creationdate), month(creationdate),1)
order by 
  datefromparts(year(creationdate), month(creationdate),1)
  
--UserID:Enter your User ID:"Enter multiple user id's comma separated"

Enter Parameters

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