Q&A for Drupal developers and administrators
---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