Down/Total votes by year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Worldbuilding

Q&A for writers/artists using science, geography and culture to construct imaginary worlds and settings

SELECT 
    DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    1) AS Month,
    (CAST(SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) AS float) / CAST(Count(*) AS float)) AS DownVoteVSTotal
FROM Votes

GROUP BY DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    1)
ORDER BY MONTH

Enter Parameters

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