Q&A about the site for members of the workforce navigating the professional setting
-- 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 (720030,20498,1035008,764272,327083,116838,1678148,1731626,9274732,245265,57997,111663,148195,1751766,350272,7913,4031815,904316,1367454,335858,65863,45375,9530,26428,7964527,3474,36305,2680216,230513,1694,13531,500584,836330,501250,329769,65696,97101,67,4249,3207,62576,643383,1053,5056,179850,184046,710446,35092,149080,4105,27439,131368,45,1329652,30461,59111,562459,283863,2635,35690,39975,2424,17693,6694,15682,16241,46926,659804,483779,1957251,995714,248616,1192728,4328123,653457,9201587,401539,6108390,205528,399104,804799,253940,719212,5282585,403610,2957534,566360,280041,1081668,1399505,972671,3214202,1953801,907184,1639366,1653521,1050058,226145,1643980,248002) ) 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;