Q&A about the site for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment
WITH PostingHistory AS (SELECT OwnerUserId FROM Posts WHERE PostTypeId IN (1,2) AND CreationDate > DATEDIFF(month, -1, GETUTCDATE()) ), Commenting AS (SELECT UserId FROM Comments WHERE CreationDate > DATEDIFF(month, -1, GETUTCDATE()) ), Editing AS (SELECT UserId FROM PostHistory WHERE PostHistoryTypeId IN (4, 5, 6) AND CreationDate > DATEDIFF(month, -1, GETUTCDATE()) ) SELECT COUNT(*) FROM Users WHERE Users.Id IN (SELECT OwnerUserId FROM PostingHistory) OR Users.Id IN (SELECT UserId FROM Commenting) OR Users.Id IN (SELECT UserId FROM Editing)