My top comments in the past 3 weeks

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

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;

Enter Parameters

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