Deleted post count by year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

SELECT year(DeletionDate) as "Date", count(id) as "Deleted post count"
from PostsWithDeleted 
group by year(DeletionDate);

SELECT Name, Id from PostHistoryTypes;

(SELECT count(PostId) as "Reopened Post Count", year(CreationDate) as "Year"
from PostHistory
Where (PostHistoryTypeId = 11) 
and year(CreationDate) > 2003
group by year(CreationDate))
union
(SELECT count(PostId) as "Undeleted Post Count", year(CreationDate) as "Year"
from PostHistory
Where (PostHistoryTypeId = 13) 
and year(CreationDate) > 2003
group by year(CreationDate))
union
(SELECT count(PostId) as "Unlocked Post Count", year(CreationDate) as "Year"
from PostHistory
Where (PostHistoryTypeId = 15) 
and year(CreationDate) > 2003
group by year(CreationDate))

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results