year by year comparison, multiple users, vba or excel questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

select
  DATEADD(yy, DATEDIFF(yy, 0, a.creationdate), 0) Answered,
  (select displayname from users where id =a.owneruserid)  [User],
  count(a.id) Answers ,
  sum( case when q.tags like '%vba>%' then 1 else 0 end ) [VBA Answers]  ,
  format(sum( case when q.tags like '%vba>%' then 1.0 else 0 end )/count(a.id),'0%') [% VBA],
  sum( case when q.tags like '%excel%' then 1 else 0 end ) [Excel Answers],
  format(sum( case when q.tags like '%excel%' then 1.0 else 0 end )/count(a.id),'0%') [% Excel]
from posts q left join posts a on q.id=a.parentid
where a.owneruserid in (##UserID##) 
  and a.posttypeid=2
  and a.closeddate is null
group by DATEADD(yy, DATEDIFF(yy, 0, a.creationdate), 0) , a.owneruserid
having count(a.id)>1
order by DATEADD(yy, DATEDIFF(yy, 0, a.creationdate), 0) , a.owneruserid

-- Enter one or more comma-separated numeric User ID's:

Enter Parameters

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