Q&A for music historians, critics, and fans
select distinct p.id, STUFF( (SELECT ',' + tagname FROM tags FOR XML PATH ('')) , 1, 1, '') from posts p join posttags pt on pt.postid=p.id join tags t1 on t1.id=pt.tagid where p.id=231767