Martial Arts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

SELECT period, Count(UserId) usercount
       
FROM   (SELECT UserId,
        CONVERT(CHAR(7), CreationDate, 20) as period 
        FROM   Comments
        UNION 
        SELECT UserId, 
        CONVERT(CHAR(7), CreationDate, 20) as period 
        FROM   PostHistory
        UNION 
        SELECT OwnerUserId, 
        CONVERT(CHAR(7), CreationDate, 20) as period 
        FROM   Posts 
        )t
        
   GROUP BY period
HAVING period <> CONVERT(CHAR(7), DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0), 20)

ORDER BY
        period

Enter Parameters

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