Q&A for professional and enthusiast programmers
DECLARE @userId int = 159145; SELECT c.PostId AS [Post Link], c.CreationDate, c.Score, c.[Text] FROM Comments AS c WHERE c.UserId = @userId AND c.Score > 1 AND c.CreationDate > DATEADD( day, -21, GETUTCDATE() ) ORDER BY c.Score DESC; /* data.se is updated every Sunday, apparently: https://meta.stackexchange.com/questions/145697/when-will-data-se-get-updated-data */ SELECT GETUTCDATE() AS [Now], MAX( c.CreationDate ) AS MostRecentCommentInDataSE FROM Comments AS c WHERE c.UserId = @userId;