Q&A for people looking to improve their interpersonal communication skills
WITH s (ID,sum,up,down) as( SELECT ID,UpVotes+DownVotes,UpVotes,DownVotes FROM USERS WHERE UpVotes>0 and DownVotes>0 GROUP BY ID,UpVotes+DownVotes,UpVotes,DownVotes HAVING UpVotes>100 OR DownVotes>100 ) SELECT top 10 Users.ID, DisplayName, UpVotes, DownVotes,UpVotes+DownVotes AS Sum FROM Users JOIN s on Users.ID=s.ID WHERE UpVotes*100/NULLIF(UpVotes, 0)-DownVotes*100/NULLIF(UpVotes, 0) =10 OR UpVotes*100/NULLIF(UpVotes, 0)-DownVotes*100/NULLIF(UpVotes, 0) =-10 GROUP BY Users.ID,DisplayName, UpVotes, DownVotes