SELECT p.Id AS [Post ID], p.Title AS [Post Title], p.Body...

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

SELECT
        p.Id AS [Post ID],
        p.Title AS [Post Title],
        p.Body AS [Post Body],
        p.Tags AS [Post Tags],
        p.CreationDate AS [Post Date],
        p.Score AS [Post Score],
        p.ViewCount AS [Post View Count],
        p.AnswerCount,
        p.CommentCount,
        pu.Id AS [Post User ID],
        pu.Reputation AS [Post User Reputation],
        pu.Location AS [Post User Location],
        pu.Views AS [Post User Views],
        pu.UpVotes AS [Post User Upvotes],
        pu.DownVotes AS [Post User Downvotes],
        c.Id AS [Comment ID],
        c.Text AS [Comment Text],
        c.Score AS [Comment Score],
        c.CreationDate AS [Comment Date],
        cu.Id AS [Comment User ID],
        cu.Reputation AS [Comment User Reputation],
        cu.Location AS [Comment User Location],
        cu.Views AS [Comment User Views],
        cu.UpVotes AS [Comment User Upvotes],
        cu.DownVotes AS [Comment User Downvotes]
    FROM
        Posts p
    JOIN
        Users pu ON p.OwnerUserId = pu.Id
    LEFT JOIN
        Comments c ON p.Id = c.PostId
    LEFT JOIN
        Users cu ON c.UserId = cu.Id
    WHERE
        p.CreationDate >= '2024-04-08' AND p.CreationDate < '2024-04-14'
    AND (p.Tags LIKE '%python%' OR
                p.Tags LIKE '%java%' OR
                p.Tags LIKE '%javascript%' OR
                p.Tags LIKE '%php%' OR
                p.Tags LIKE '%sql%' OR
                p.Tags LIKE '%postgres%' OR
                p.Tags LIKE '%rand%' OR
                p.Tags LIKE '%ruby%' OR
                p.Tags LIKE '%c++%' OR
                p.Tags LIKE '%c#%' OR
                p.Tags LIKE '%html%' OR
                p.Tags LIKE '%css%') -- Filter for programming language tags
    ORDER BY
        p.CreationDate, c.CreationDate;

Enter Parameters

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