Deleted questions count for tag between deletion date

0

Please login or register to vote for this query.

(click on this box to dismiss)

Philosophy Meta

Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence

SELECT
  (
    SELECT COUNT(*)
    FROM PostsWithDeleted
    WHERE PostTypeId = 1 -- Questions
    AND Tags LIKE '%<' + ##tag:string## + '>%'
  ) AS 'Total questions',
  (
    SELECT COUNT(DeletionDate)
    FROM PostsWithDeleted
    WHERE PostTypeId = 1 -- Questions
    AND Tags LIKE '%<' + ##tag:string## + '>%'
  ) AS 'Total deleted questions',
  COUNT(DeletionDate) AS 'Questions deleted in date range'
  FROM PostsWithDeleted
  WHERE PostTypeId = 1 -- Questions
    AND DeletionDate BETWEEN ##fromDate:string## AND ##tillDate:string##
    AND Tags LIKE '%<' + ##tag:string## + '>%'

Enter Parameters

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