Q&A for professional and enthusiast programmers
select top ##NumResults:int?50## p.Id, p.Id as [Post Link] from posthistory ph inner join posthistorytypes pht on ph.posthistorytypeid = pht.id inner join posts p on ph.PostId = p.Id --inner join pendingflags pf on p.Id = pf.PostId where pht.id = 10 --and pf.CloseAsOffTopicReasonTypeId = 4