Questions per month, Android

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select *, count(*) from
(
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + 
      cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as date) Month, 
    t.TagName
  from (
    select p.Id, p.CreationDate from Posts p
    join PostTags pt on pt.PostId = p.Id
    join Tags t on t.Id = pt.TagId
    where t.TagName = 'android'
    ) pp
  join PostTags pt on pt.PostId = pp.Id
  join Tags t on t.Id = pt.TagId
  where t.TagName in ( 
  'android' )
) as X
group by TagName, Month
order by Month asc, count(*) desc

Enter Parameters

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