Q&A about the site for professional robotic engineers, hobbyists, researchers and students
select --tagname, count(*), sum(score) from * from (SELECT t.TagName, a.Score FROM Posts a INNER JOIN Posts q ON q.Id=a.ParentId INNER JOIN PostTags pt ON q.Id = pt.PostId INNER JOIN Tags t ON pt.TagId = t.Id WHERE (a.OwnerUserId=##userid##) AND (a.CommunityOwnedDate IS NULL)) a UNION SELECT t.TagName, 0 as Score FROM Posts q INNER JOIN PostTags pt ON q.Id = pt.PostId INNER JOIN Tags t ON pt.TagId = t.Id WHERE (q.OwnerUserId=##userid##) AND (q.parentid is null) AND (q.CommunityOwnedDate IS NULL) --GROUP BY t.Tagname --ORDER BY SUM(Score) DESC