Q&A about the site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field
-- This SQL query fetches the content of Stack Overflow answer posts based on specific IDs from the PostHistory table SELECT ph.Id AS HistoryId, ph.PostId, ph.RevisionGUID, p.Body AS PostContent, ph.CreationDate, ph.UserId, u.DisplayName AS UserName FROM PostHistory ph JOIN Posts p ON ph.PostId = p.Id LEFT JOIN Users u ON ph.UserId = u.Id WHERE ph.PostHistoryTypeId = 5 -- Edit Body AND p.PostTypeId = 2 -- Answer Posts AND ph.Id IN (12345, 67890, 101112) -- Replace these IDs with your specific History IDs ORDER BY ph.CreationDate;