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)

Language Learning

Q&A for students, teachers, polyglots, and anyone interested in the techniques of second-language acquisition

SELECT
    p.Id AS [Post ID],
    p.Title AS [Post Title],
    p.Body AS [Post Body],
    p.CreationDate AS [Post Creation Time],
    p.Score AS [Post Score],
    p.ViewCount AS [Post View Count],
    p.AnswerCount,
    p.CommentCount,
    p.FavoriteCount,
    p.ContentLicense,
    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.UserId AS [Comment User ID],
    c.Text AS [Comment Text],
    c.Score AS [Comment Score],
    c.CreationDate AS [Comment Creation Time],
    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-01' AND p.CreationDate < '2024-04-08'
ORDER BY
    p.CreationDate, c.CreationDate;

Enter Parameters

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