Q&A for amateur radio enthusiasts
/* This returns stats about your suggested edit reviews*/ DECLARE @UserId int = ##UserId## select total, approved, round(cast(approved*100 as float)/total ,1) ApprovedPercentage, rejected, round(cast(rejected*100 as float)/total ,1) RejectedPercentage from ( select count(case when VoteTypeId = 2 then 1 end) approved, count(case when VoteTypeId = 3 then 1 end) rejected, count(VoteTypeId) total from SuggestedEditVotes where UserId = @UserId ) as grouped;