SELECT a.Id AS [Answer ID], a.CreationDate AS [Answer Cre...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Retrocomputing Meta

Q&A about the site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear

SELECT
a.Id AS [Answer ID],
a.CreationDate AS [Answer Creation Date],
a.Body AS [Answer Body],
c.Id AS [Comment ID],
c.Text AS [Comment Text],
c.CreationDate AS [Comment Creation Date]
FROM
Posts q
INNER JOIN
Posts a ON q.Id = a.ParentId
INNER JOIN
Comments c ON a.Id = c.PostId
INNER JOIN (
  SELECT
    PostId,
    MAX(CreationDate) AS MaxCreationDate
  FROM
    Comments
  GROUP BY
    PostId
) AS mc ON c.PostId = mc.PostId AND c.CreationDate = mc.MaxCreationDate
WHERE
q.ViewCount > 10000
AND q.Tags LIKE '%<java>%'
AND a.CreationDate > DATEADD(DAY, -30, GETDATE())
AND a.PostTypeId = 2
ORDER BY
a.CreationDate DESC;

Enter Parameters

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