Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs
SELECT [Post Link] = ph.PostId, case when ph.PostHistoryTypeId = 19 then 'Protected' else 'Unprotected' end, ph.CreationDate FROM PostHistory ph WHERE ph.PostHistoryTypeId in (19, 20) and ph.UserId = ##UserId## ORDER BY ph.CreationDate DESC