Average time between post creation and first vote


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 top 30
CONVERT(DATETIME, CONCAT(YEAR(p.CreationDate), '-', MONTH(p.CreationDate), '-01'), 20) AS Mes,

FROM Posts as p JOIN (Select TOP 1 CreationDate,PostId FROM Votes ORDER BY CreationDate DESC) v ON v.PostId=p.Id
GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate)
ORDER BY YEAR(p.CreationDate), MONTH(p.CreationDate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results