select *, count(*) from ( select CAST( cast(DATEPART(YYYY...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Pets

Q&A for pet owners, caretakers, breeders, veterinarians, and trainers

select *, count(*) from
(
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month], 
    (CASE 
      WHEN 
        (t.TagName in ('urbancode','ucd','udeploy'))
        then (select 'UrbanCodeDeploy')
      WHEN 
        (t.TagName in ('vsts', 'tfs-service', 'team-foundation-service', 'vso', 'visual-studio-online', 'vs-team-services', 'visual-studio-team-services'))
        then (select 'vsts')
      ELSE 
      t.TagName
    end) as TagName
  from Posts p 
  join PostTags pt on pt.PostId = p.Id
  join Tags t on t.Id = pt.TagId
  where TagName in ('urbancode','ucd','udeploy', 
  'vsts', 'tfs-service', 'team-foundation-service', 'vso', 'visual-studio-online', 'vs-team-services', 'visual-studio-team-services',
  'jenkins')
) as X
group by TagName, [Month]
order by [Month] asc, TagName asc

Enter Parameters

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