Couchbase stackflow 02-05-2024

0

Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

SELECT
  q.Id AS [Question Id],
  q.Title AS [Question Title],
  q.Body AS [Question Body],
  q.CreationDate AS [Question Date],
  a.Id AS [Answer Id],
  a.Body AS [Answer Body],
  a.CreationDate AS [Answer Date]
FROM
  Posts q
JOIN
  Posts a ON q.Id = a.ParentId
WHERE
  q.PostTypeId = 1 -- Question
AND
  a.PostTypeId = 2 -- Answer
AND
  q.Tags LIKE '%<couchbase>%'
AND 
  q.CreationDate >= DATEADD(year, -3, GETDATE()) -- Posts from the last three years
AND
  q.AcceptedAnswerId = a.Id -- Only questions where the answer is the accepted one
ORDER BY
  q.CreationDate DESC;

Enter Parameters

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