select datepart(year, uba.[Question Creation Date]) as [Y...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A for engineers, producers, editors, and enthusiasts spanning the fields of audio, video, and media creation

select datepart(year, uba.[Question Creation Date]) as [Year],
 datepart(month, uba.[Question Creation Date]) as [Month],
 count(*) as [High Rated Questions Count]
from (select min(q.CreationDate) as [Question Creation Date], 
        count(*) as [Upvotes Count]
      from Votes v
      inner join Posts q on v.PostId = q.Id
      where v.VoteTypeId = 2
        and q.PostTypeId = 1
        and (select count(*)
             from PostTags pt
             inner join Tags t on pt.TagId = t.Id
             where pt.PostId = q.Id
               and t.TagName = '##tagName##') > 0
      group by v.PostId) uba
where uba.[Upvotes Count] >= 5
group by datepart(year, uba.[Question Creation Date]),
  datepart(month, uba.[Question Creation Date])
order by [Year], [Month]

Enter Parameters

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