How mean am I?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ratio of downvotes compared to all users

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

-- How mean am I?
-- Ratio of downvotes compared to all users 

    SELECT DisplayName, UpVotes, DownVotes, DownVotes*1.0/(UpVotes+DownVotes) as Ratio
      FROM Users
     WHERE Id = ##UserId##
     UNION
    SELECT 'Overall Average', SUM(UpVotes), SUM(DownVotes), SUM(DownVotes)*1.0/(SUM(DownVotes)+SUM(UpVotes))
      FROM Users

Enter Parameters

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