Most frequent tags on deleted questions - only tags which no longer exist

1

Please login or register to vote for this query.

(click on this box to dismiss)

Cognitive Sciences Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

---we cannot use PostTags table - since we want data about DELETED question
---similar query - but only existing tags: https://data.stackexchange.com/mathoverflow/query/1251170/percentage-of-deleted-question-per-tag-only-existing-tags
; with tags_cte AS
(
SELECT
  Id PostId,
  replace(value,'>','') TagName
FROM
  PostsWithDeleted
  CROSS APPLY STRING_SPLIT(Tags,'<')
Where posttypeid = 1
and len(value) > 0
)

SELECT
  TagName,
  COUNT(PostId) AS [Count]
FROM tags_cte
WHERE NOT(Tagname IN (SELECT TagName from Tags))
GROUP BY TagName
ORDER BY COUNT(PostId) DESC

Enter Parameters

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