Tags that lack descriptions/excerpts

1

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

-- Tags get automatically destroyed after 6 months if they
-- are only used by one question, and have no tag wiki.
-- This query sorts those tags to the top since they need
-- tags most urgently.

select
  Tags.TagName,
  Tags.Count as 'Question count',
  MonthsAlive as 'Months til single-use auto destruct',
  SoloTags.PostId as [Post Link]
from Tags
left join (
  select
    Tags.Id as TagId,
    (6 - DATEDIFF(month, Posts.CreationDate, GETDATE())) as MonthsAlive,
    Posts.Id as PostId
  from PostTags
    inner join Tags
      on PostTags.TagId = Tags.Id
    inner join Posts
      on PostTags.PostId = Posts.Id
  where Tags.Count <= 1
) as SoloTags
  on SoloTags.TagId = Tags.Id
where ExcerptPostId is null
order by
  case when MonthsAlive is null then 99 else MonthsAlive end,
  Tags.Count desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results