Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
DECLARE @PostId INT = 10259157--10603095; SELECT q.Id, q.PostTypeId, q.CreationDate, q.Title, a.Id, a.PostTypeId, a.CreationDate, a.OwnerUserId, u.DisplayName, u.EmailHash, u.Age, u.CreationDate FROM Posts q INNER JOIN Posts a ON a.ParentId = q.Id INNER JOIN Users u ON a.OwnerUserId = u.Id WHERE q.PostTypeId = 1 --1=Q, 2=A AND q.Id = @PostId ORDER BY a.CreationDate