Numbers of deleted questions for synonymized tags

1

Please login or register to vote for this query.

(click on this box to dismiss)

Quantitative Finance Meta

Q&A about the site for finance professionals and academics

; with tags_cte AS
(
SELECT
  Id PostId,
  replace(value,'>','') TagName
FROM
  PostsWithDeleted
  CROSS APPLY STRING_SPLIT(Tags,'<')
Where posttypeid = 1
  and Deletiondate is NOT NULL
and len(value) > 0
),
tagstats_cte as
(
SELECT
t.TagName AS TagName,
---Count(q.DeletionDate) AS DeletedCount
Count(q.Id) AS DeletedCount
FROM PostsWithDeleted q INNER JOIN tags_cte t ON q.Id = t.PostId
WHERE (q.PostTypeId = 1)  
GROUP BY t.TagName
)

SELECT
  ts.SourceTagname,
  ts.TargetTagname,
  t.DeletedCount
FROM TagSynonyms ts INNER JOIN tagstats_cte t ON ts.SourceTagname=t.Tagname
ORDER BY DeletedCount DESC

Enter Parameters

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