POSTS

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 (1592191,515034,1520364,981744,5666987,774612,42124,8449629,477476,2930661,6782707,410289,1989480,875775,4390381,185647,496852,1551022,2491900,155336,1423922,3375906,11015427,1395668,1825618,1350476,367949,452587,13508,865874,2138,761202,4596,175071,1351469,352672,12388,3956070,3915438,1802671,3304426,4484822,38207,401656,1573712,2571840,450398,1870153,166452,11698,4385913,183422,1004046,423171,3203588,94144,1168804,299897,210818,1209430,940158,34598,1147273,246277,4608204,1609356,546205,6160119,563072,808091,250294,40256,266978,123204,9199828,1077364,1485885,4159572,27535,1119701,641955,880990,19082,155077,774116,99594,694576,2260,1765658,2658202,1509764,88558,390581,3933332,1400793,15622,182676,382763,4954037,220447)
   )
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;

Enter Parameters

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