post

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

-- 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 (613130,21677,234938,25050,318758,109305,880990,1180620,2670892,290085,613198,1384652,12983,149080,184883,256970,150634,21632,13792,714968,189205,1000343,370305,18511,108205,2411802,4105,32880,106159,273200,241631,25324,25222,67392,304,282848,861716,445517,135786,210578,428790,16363,107744,846273,466862,29,205608,15245,2140,44084,573261,238886,387076,95612,74757,1422451,314291,1104384,41360,98607,25449,348545,214010,2483313,91914,128511,82320,1229023,188246,8815,2455888,13055,142434,179125,410767,2442099,776560,7595,75642,411591,1686485,191596,80860,130758,3250829,75500,5423108,1285133,24054,5185595,6461,104458,377270,17279,16632,45664,15861,1811992,12725,4482)  
   )
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 1 AND 500;

Enter Parameters

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