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 (25646,415448,5424988,980833,128983,76337,524368,785065,17172,348785,762073,329769,128421,438992,135978,811,4952130,62082,1155209,93623,1708801,14069,501696,39321,171318,1542290,567292,993547,120955,65696,2688,905,89771,1630618,71522,364696,649665,159145,1120273,6361531,445131,1600898,101361,1709587,1025118,84201,2410359,223386,5393381,4851590,266143,2313887,1695960,4238408,577088,305,41116,141172,601179,615754,1870803,1333873,383861,1140579,96656,244297,4766,3545273,1298762,97101,4725,9473764,44389,135531,561731,32632,741747,146325,13508,140740,1119701,345031,1249581,464581,903061,5441,152602,201952,67,851273,85785,4593267,95382,546661,1209279,90848,9097906,1832058,2231815,165737)  
   )
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