How many helpful answers have I posted?

0

Please login or register to vote for this query.

(click on this box to dismiss)

How many of my answers were either accepted or have score > 0?

Project Management

Q&A for project managers

-- 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

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results