Q&A about the site for serious players and enthusiasts of poker
with user_votes as ( select userid , cast(sum(case when votetypeid = 2 then 1 else 0 end) as float) as approved , cast(sum(case when votetypeid = 3 then 1 else 0 end) as float) as rejected , count(*) as total from suggestededitvotes group by userid ) select cast(avg(approved * 100 / total) as numeric(5,2)) as [Approval Rate] , cast(avg(rejected * 100 / total) as numeric(5,2))as [Rejection Rate] , cast(avg(approved) as numeric(5,2)) as [Average Approved] , cast(avg(rejected) as numeric(5,2)) as [Average Rejected] , cast(avg(total) as numeric(5,2)) as [Average Votes] from user_votes