Days since post creation that a vote was cast

1

Please login or register to vote for this query.

(click on this box to dismiss)

Statistical Analysis

Q&A for statisticians, data analysts, data miners and data visualization experts

SELECT
    Votes.Id AS VoteId,
    Votes.PostId AS PostId,
    Votes.VoteTypeId AS VoteType,
    Votes.CreationDate AS Vote_Date,
	Posts.CreationDate AS Post_Date,
	DATEDIFF(day,Posts.CreationDate,Votes.CreationDate) AS DayVote
FROM Votes
    INNER JOIN Posts ON Votes.PostId = Posts.Id    
WHERE
    Posts.CreationDate > '20120101' AND (VoteTypeId = 2 OR VoteTypeId = 3)
ORDER BY
    Post_Date

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached