Q&A for SharePoint enthusiasts
SELECT COUNT(a.Id) as [Accepted Answers], (10 - SUM(CASE WHEN a.Score = 0 THEN 1 ELSE 0 END)) AS [Answers till Unsung] FROM Posts q INNER JOIN Posts a on a.Id = q.AcceptedAnswerId WHERE a.CommunityOwnedDate IS NULL AND a.OwnerUserId = ##UserId## AND q.OwnerUserId != ##UserId## AND a.PostTypeId = 2