Q&A for professional and enthusiast programmers
select post.Id as [Post Link], case when post.PostTypeId = 1 then 'Question' when post.PostTypeId = 2 then 'Answer' when post.PostTypeId = 3 then 'Orphaned Tag Wiki' when post.PostTypeId = 4 then 'Tag Wiki Excerpt' when post.PostTypeId = 5 then 'Tag Wiki' when post.PostTypeId = 6 then 'Moderator Nomination' when post.PostTypeId = 7 then 'Wiki Placeholder' when post.PostTypeId = 8 then 'Privelege Wiki' else 'Unknow post type' end as Type from Posts as post where post.OwnerUserId = ##UserId##