SELECT TOP 5000 -- Fetch the top 50 results q.Id AS Quest...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cryptography

Q&A for software developers, mathematicians and others interested in cryptography

-- Fetch questions and top answers related to data science in healthcare from 2022 onwards
SELECT TOP 5000 -- Fetch the top 50 results
    q.Id AS QuestionId,
    q.Title AS QuestionTitle,
    q.Body AS QuestionBody,
    q.Score AS QuestionScore,
    a.Id AS AnswerId,
    a.Body AS AnswerBody,
    a.Score AS AnswerScore,
    q.CreationDate AS QuestionDate,
    a.CreationDate AS AnswerDate
FROM Posts AS q
LEFT JOIN Posts AS a ON q.Id = a.ParentId
WHERE q.PostTypeId = 1 -- Questions
  AND a.PostTypeId = 2 -- Answers
  AND (q.Tags LIKE '%data-science%' OR q.Tags LIKE '%healthcare%')
  AND q.CreationDate >= '2022-01-01' -- Only questions from 2022 onwards
  AND a.Score = (
      SELECT MAX(a2.Score)
      FROM Posts AS a2
      WHERE a2.ParentId = q.Id AND a2.PostTypeId = 2
  )
ORDER BY q.Score DESC, a.Score DESC;

Enter Parameters

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