COMMENTS

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

-- Step 3: Extract comments for the posts in batches
WITH CommentBatch AS (
    SELECT
        c.Id AS CommentId,
        c.Text,
        p.Title,
        p.OwnerUserId AS UserId,
        u.DisplayName,
        u.Location,
        t.TagName,
        ROW_NUMBER() OVER (PARTITION BY p.Id ORDER BY c.CreationDate DESC) AS CommentRowNum
    FROM Comments c
    INNER JOIN Posts p ON c.PostId = p.Id
    INNER JOIN Users u ON p.OwnerUserId = u.Id
    INNER JOIN PostTags pt ON p.Id = pt.PostId
    INNER JOIN Tags t ON pt.TagId = t.Id
    WHERE t.TagName IN ('python', 'java', 'csharp', 'php', 'javascript', 'go', 'swift') -- Programming languages filter
    AND p.OwnerUserId IN (605153,1206613,521070,51,7409220,5353753,871910,67824,1113002,1120015,617373,827927,435605,6539317,3191896,5311735,960558,768110,62192,1646240,279776,735446,356716,637669,286595,403105,188826,3523579,2176945,936986,388427,512042,76393,1349754,417810,1467858,4842742,19772,817657,1430927,75284,12123,470717,1503018,1024794,860478,3563993,654891,4251546,2427222,185919,2894369,5997596,1542806,435904,909085,1031981,11227781,558018,2363866,1052325,1863950,482864,411928,677881,7093741,1709725,37664,55808,10340970,2729109,2930152,785923,4691207,3523935,8107092,8412192,136132,174622,2513872,2746582,961314,10199138,3473770,799734,337988,3278063,9279003,1025379,779076,56995,18382,3239341,126039,8601760,10959940,704703,1168156,29347,1869846)
   )
SELECT
    cb.CommentId,
    cb.Title AS CommentTitle,
    cb.Text AS CommentText,
    cb.UserId,
    cb.DisplayName AS UserName,
    cb.Location AS UserCountry,
    cb.TagName AS CommentTag
FROM CommentBatch cb
WHERE cb.CommentRowNum BETWEEN 0 AND 500;

Enter Parameters

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