Votes/Day for Great Answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Almost all Great Answers (100+ score) were great the first day.

Bicycles

Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- Votes/Day for Great Answers
-- Almost all Great Answers (100+ score) were great the first day.

DECLARE @Total INT;

SELECT
    @Total = COUNT(*) 

FROM
    Posts

WHERE
    Score > 100 --great
AND PostTypeId = 2 --answer 
AND CommunityOwnedDate IS NULL




SELECT
    DATEDIFF( D, Posts.CreationDate, Votes.CreationDate) + 1 AS Days,
    COUNT(Votes.Id) / @Total AS Votes
    --AVG( Score ),
    --AVG( CommentCount )

FROM
    Posts

    INNER JOIN
    Votes
    ON Posts.Id            = Votes.PostId

WHERE
        Score              > 100 --great
    AND PostTypeId         = 2 --answer 
    AND CommunityOwnedDate IS NULL

GROUP BY
    DATEDIFF( D, Posts.CreationDate, Votes.CreationDate)

HAVING
    COUNT(Votes.Id) / @Total > 0

ORDER BY
    DATEDIFF( D, Posts.CreationDate, Votes.CreationDate)       ASC 

--2 up
--3 down

Enter Parameters

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