Tireless and Unsung Hero

2

Please login or register to vote for this query.

(click on this box to dismiss)

My acceptance ratio

Emacs

Q&A for those using, extending or developing Emacs

-- Tireless and Unsung Hero
-- My acceptance ratio so far.
declare @user int = ##UserID##
declare @temp table(total int, zero int);
insert into @temp(total, zero) values((select count(p1.id) from posts p1, posts p2
where p1.owneruserid = @user and
p1.id = p2.acceptedanswerid group by p1.owneruserid),
(select count(p1.id) from posts p1, posts p2
where p1.owneruserid = @user and p1.score = 0 and
p1.id = p2.acceptedanswerid group by p1.owneruserid));
select zero as 'Zero Scored', total as 'Total Accepted',
zero * 100 / total as 'Ratio' from @temp;

Enter Parameters

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