historic language popularity

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 TagName,
  (
    select count(TagName)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -6, GetDate())
      and Posts.CreationDate < DATEADD(year, -5, GetDate())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2007',
  (
    select count(TagName)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -5, GetDate())
      and Posts.CreationDate < DATEADD(year, -4, GetDate())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2008',
  (
    select count(TagName)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -4, GetDate())
      and Posts.CreationDate < DATEADD(year, -3, GetDate())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2009',
  (
    select count(TagName)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -3, GetDate())
      and Posts.CreationDate < DATEADD(year, -2, GetDate())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2010',
  (
    select count(TagName)
    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())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2011',
  (
    select count(TagName)
    from Tags
    join PostTags on PostTags.TagId = Tags.Id
    join Posts on Posts.Id = PostTags.PostId
    where Posts.CreationDate > DATEADD(year, -1, GetDate())
    and TagName = allTheTags.TagName
    and PostTypeId = 1
    group by Tags.TagName
  ) as '2012'
from Tags allTheTags
where allTheTags.TagName = 'php' or
  allTheTags.TagName = 'c' or 
  allTheTags.TagName = 'c#' or
  allTheTags.TagName = 'ios' or
  allTheTags.TagName = 'android' or
  allTheTags.TagName = 'python' or
  allTheTags.TagName = 'vb.net' or
  allTheTags.TagName = 'java' or
  allTheTags.TagName = 'perl' or
  allTheTags.TagName = 'ruby' or
  allTheTags.TagName = 'c++' or
  allTheTags.TagName = 'cobol' or
  allTheTags.TagName = 'mainframe' or
  allTheTags.TagName = 'cics'
order by allTheTags.TagName

Enter Parameters

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