History of Downvote % and Downvotes per User, over time


Please login or register to vote for this query.

(click on this box to dismiss)

Reference: https://meta.stackoverflow.com/questions/368511/are-there-trends-towards-being-more-welcoming

Stack Overflow

Q&A for professional and enthusiast programmers

WITH votesByMonth AS (
    SELECT      Dateadd (month, Datediff (month, 0, v.CreationDate), 0)     AS [Month]
                , Sum (CASE v.VoteTypeId  WHEN 2  THEN 1  ELSE 0  END)      AS upVotes
                , Sum (CASE v.VoteTypeId  WHEN 3  THEN 1  ELSE 0  END)      AS dwnVotes
                /*  There is no way to count the number of distinct users who gave up or down votes.
                    The following is always zero for vote types 2 and 3...
                --, Count (Distinct UserId)                                   AS [Num Users]
    FROM        Votes v
    WHERE       v.VoteTypeId IN (2, 3)
    GROUP BY    Dateadd (month, Datediff (month, 0, v.CreationDate), 0)
SELECT      vbm.[Month]  -- Month first, so graph works
            --, vbm.upVotes                   AS [Up Votes]
            --, vbm.dwnVotes                  AS [Dwn Votes]
            --, vbm.upVotes + vbm.dwnVotes    AS [Ttl Votes]
            , 100.0 * vbm.dwnVotes / (vbm.upVotes + vbm.dwnVotes)  AS [Dwn Vote %]
FROM        votesByMonth vbm
ORDER BY    vbm.[Month]

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results