'Copy editor' and 'Strunk & White' badges progress

1

Please login or register to vote for this query.

(click on this box to dismiss)

You need 500 edited posts to get 'Copy editor' badge and 80 edits to get 'Strunk & White' badge

Stack Overflow

Q&A for programmers

DECLARE @user INT = ##UserId:int##
DECLARE @edits INT

select
    @edits=COUNT(*)
FROM PostHistory
LEFT JOIN Posts as Post on PostHistory.PostId=Post.Id
WHERE UserId=@user and Post.OwnerUserId!=@user
AND PostHistoryTypeId in (4,5)

SELECT
    @edits,
    CAST(ROUND(@edits * 1.25, 2) as VARCHAR(10)) + '%' as StrunkAndWhite,
    CAST(ROUND(@edits / 5.0, 2) as VARCHAR(10)) + '%' as CopyEditor

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached