Q&A for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry
SELECT q.ID, a.Score, "Answer is Deleted" = CASE WHEN a.DeletionDate IS NULL THEN 'N' ELSE 'Y' END FROM PostsWithDeleted q LEFT JOIN PostsWithDeleted a ON q.ID = a.ParentId WHERE 1=1 AND q.PostTypeId = 1 --q is a question AND a.PostTypeId = 2 --a is an answer --AND q.ID IN (4) --AND q.CreationDate = '20241101' AND q.CreationDate between '2024-10-29' and '2024-10-30' --ORDER BY q.ID, a.Score DESC ;