Q&A about the site for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment
DECLARE @PostId int = ##PostId## select creationdate as CDate, posthistorytypeid as Type, id as Id, postid as Connect, userid as Actor, comment, text as Content from posthistory where postid in (select id from posts where id = @postid or parentid = @postid ) order by posthistorytypeid, creationdate