Tag statistics per year, month

0

Please login or register to vote for this query.

(click on this box to dismiss)

My gut feeling says there is smt happening with question of python, and then i tried to find some proof to my gut feeling.

Gardening and Landscaping Meta

Q&A about the site for gardeners and landscapers

-- Tag statistics per year, month
-- My gut feeling says there is smt happening with question of python, and
-- then i tried to find some proof to my gut feeling.

select 
  datepart(year, p.CreationDate) Year,
  datepart(month, p.CreationDate) Month,
  count(*) as questions,
  count(p.ClosedDate) as closed_questions,
  avg(p.Score*1.0) as avg_score,
  sum(p.ViewCount) as total_view,
  avg(p.AnswerCount*1.0) as avg_answers,
  avg(p.CommentCount*1.0) as avg_comment,
  avg(p.FavoriteCount * 1.0) as avg_favorite
from Posts p
join Posts p1 on p.Id = p1.ParentId
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId 
where t.TagName in ('c#') and p.PostTypeId = 1
group by datepart(year, p.CreationDate), datepart(month, p.CreationDate)
order by datepart(year, p.CreationDate) desc, datepart(month, p.CreationDate) desc

Enter Parameters

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