Share between web frameworks


Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A about the Stack Exchange Network

create table #tmp([Month] datetime, TagName varchar(255), Number float)

insert into #tmp
select [Month], TagName, count(*) from
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month], 
  from Posts p 
  join PostTags pt on pt.PostId = p.Id
  join Tags t on t.Id = pt.TagId
  where TagName in ('vue.js', 'reactjs', 'angular', 'angularjs', 'redux') --and CreationDate > '2014-12-31'
) as X
group by TagName, [Month]
order by [Month] asc, TagName asc

select [Month], TagName, Number/(select Sum(Number) from #tmp where a.[Month] = [Month] group by [Month])
from #tmp as a
order by [Month] asc, TagName asc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results