Average time between post creation and first vote

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow em Português

Perguntas e respostas para programadores profissionais e entusiastas

SELECT
CONVERT(DATETIME, CONCAT(YEAR(Posts.CreationDate), '-', MONTH(Posts.CreationDate), '-01'), 20) AS Mes,
Posts.Id, v.PostId
FROM (SELECT MIN(CreationDate) as FirstVoteCreationDate, PostId FROM Votes WHERE VoteTypeId IN(2,3) GROUP BY PostId) v RIGHT JOIN Posts on Posts.Id=v.PostId
WHERE PostTypeId=2 -- Somente perguntas

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results