Q&A for anime and manga fans
-- 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 (5928186,21886,61305,13005,1348195,390330,8394265,7412,1774667,60761,8206,129570,12960,63051,87015,541091,3474,55847,458193,54680,8620333,49153,174777,39677,6618622,14065,491243,112968,1855677,464709,252000,827263,14955,5133585,596285,673730,126042,12597,251311,12299030,204847,16343464,82548,3730754,1427416,846892,75525,125734,426671,7552,5233410,84651,366904,41071,36305,115730,33518,6622587,103154,1566221,1199,6464308,1030675,634824,2680216,8985,12870,15498,1903116,654031,134633,2079303,50552,417562,48523,152948,470005,2303865,1386886,201359,535871,2380830,46642,126014,10397,901925,36723,125816,11236,56338,126769,841108,405015,661519,206403,424499,116908,707111,190277,140719) ) 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 1 AND 500;