historic language popularity

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

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
    group by Tags.TagName
  ) as '2017',
  (
    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
    group by Tags.TagName
  ) as '2018',
  (
    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
    group by Tags.TagName
  ) as '2019',
  (
    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
    group by Tags.TagName
  ) as '2020',
  (
    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
    group by Tags.TagName
  ) as '2022',
  (
    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
    group by Tags.TagName
  ) as '2023'

from Tags allTheTags
where allTheTags.TagName like 'kotlin' AND
allTheTags.TagName like 'Android'
order by allTheTags.TagName

Enter Parameters

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