with h as( select datepart(year, p.CreationDate) as Year...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping Meta

Q&A about the site for gardeners and landscapers

with h as(
select datepart(year,  p.CreationDate) as Year, datepart(week, p.CreationDate) as Week, p.Id PostId
from Posts p
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId 
where t.TagName Like 'ios%' or t.TagName Like 'iphone%' or t.TagName like 'ipad%'
group by datepart(week, p.CreationDate), datepart(year, p.CreationDate), p.Id
)

select h.year, h.week, count (*) as total
from h
group by h.year, h.week
order by h.year desc, h.week desc

Enter Parameters

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