Q&A for developers building blockchains with the Substrate SDK
-- Step 2: Extract posts for the selected users WITH PostBatch AS ( SELECT p.Id AS PostId, p.Title, p.Body, p.OwnerUserId AS UserId, u.DisplayName, t.TagName, u.Location, ROW_NUMBER() OVER (PARTITION BY p.OwnerUserId ORDER BY p.CreationDate DESC) AS PostRowNum FROM Posts p 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 LOWER(t.TagName) IN ('python', 'java', 'csharp', 'php', 'javascript', 'go', 'swift') -- Programming languages filter AND p.OwnerUserId IN (446279,167897,559745,5025009,448580,157397,971,349909,49241,2612235,366256,150967,95353,19435,321973,2796,94363,446822,492513,3077495,6260,532430,575765,2302862,479251,1122645,1987598,2497492,357124,169165,7404323,1936853,5366046,1309708,635364,536078,8581025,2689257,2050087,205589,3393718,727028,7899301,828952,929740,5759942,3480122,3265872,122423,1290203,93623,1109,3617886,282848,544825,318425,694331,1851712,725418,58961,109374,38055,2030321,1524450,56763,346804,842,198128,73772,1137669,1296280,5576310,45685,598511,576719,7241,646887,1696560,44620,6699433,1933675,66849,64495,1163019,57068,227803,210964,296568,87973,4510,6345,3074768,247563,2389707,592253,929999,79354,2114,1035889,44563) ) SELECT p.PostId, p.Title AS PostTitle, p.Body AS PostBody, p.UserId, P.DisplayName AS UserName, p.Location AS UserCountry, p.TagName AS PostTag FROM PostBatch p WHERE p.PostRowNum BETWEEN 0 AND 500;