Q&A for people studying math at any level and professionals in related fields
SELECT TOP ##number?100## q.Id, url = 'site://q/' + CAST(q.Id AS varchar), q.CreationDate, q.DeletionDate, q.Score, url = 'site://q/' + CAST(a.Id AS varchar), a.Score, q.Tags FROM PostsWithDeleted q INNER JOIN PostsWithDeleted a ON a.ParentId = q.Id WHERE (q.Deletiondate IS NOT NULL) and (a.DeletionDate=q.DeletionDate) and (q.PostTypeId =1) and (a.PostTypeId=2) and (q.Deletiondate >= '##Date1?2020-01-01##') AND (q.Deletiondate <= '##Date2?2021-01-01##') ---ORDER BY q.Id DESC ORDER BY q.DeletionDate DESC