Worst Tags for Answers

1

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

Select 
  TagName,
  row_number() over (order by cast((Deleted + Closed) as decimal)/Cast(Total as decimal) asc) as Rank,
  substring(cast(cast((Deleted + Closed) as decimal)/Cast(Total as decimal)*100.00 as varchar), 1,6) + '%' as 'Close Rate',
  Total as 'Total Posts',
  (Deleted + Closed) as 'Deleted or Closed'
From
  (select 
    TagName,
    Count(p.Id) as Total,
    Count(p.DeletionDate) as Deleted,
    Count(p.ClosedDate) as Closed
  From Tags
  Inner JOIN PostTags ON PostTags.TagId = Tags.Id
  Inner Join PostsWithDeleted as p ON (p.ParentId = PostTags.PostId)

  Group By TagName) as p

Order by Rank Asc

Enter Parameters

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