How many of my answers were either accepted or have score > 0?
Q&A for gardeners and landscapers
-- How many helpful answers have I posted? -- How many of my answers were either accepted or have score > 0? SELECT a.id, sum(case when a.PostTypeId = 2 then 1 end) AS Accepted, sum(case when a.PostTypeId = 2 then 1 end) AS 'score>0', sum(case when a.PostTypeId = 2 then 1 end) AS 'acceptedorscore>0' FROM Posts q INNER JOIN Posts a ON q.AcceptedAnswerId = a.Id WHERE a.OwnerUserId = 2234742 group by a.id, a.PostTypeId