select 'total', ( select count(Tags.Id) from Tags join Po...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Space Exploration

Q&A for spacecraft operators, scientists, engineers, and enthusiasts

select 'total',
  (
    select count(Tags.Id)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -2, GetDate())
      and Posts.CreationDate < DATEADD(year, -1, GetDate())
  ) as '2011',
  (
    select count(Tags.Id)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -1, GetDate())
  ) as '2012'
from Tags allTheTags

Enter Parameters

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