Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry
WITH CS AS ( SELECT PostId FROM Comments WHERE UserId = 39930 GROUP BY PostId ) SELECT CS.PostId, CASE WHEN Posts.PostTypeId = 1 THEN Posts.Id ELSE Posts.ParentId END AS Question FROM CS INNER JOIN Posts ON Posts.Id = CS.PostId