Distribution of time untill first vote.

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cognitive Sciences Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

With 
members as (
   select u.Id as Id, 
          min(p.CreationDate) as FirstPostDate
   from Users u join PostsWithDeleted p
   on u.id = p.OwnerUserId
   where DATEDIFF(hh, '2012/01/01 00:00', u.CreationDate) > 0
   group by u.Id
),
votetimes as (
   select m.Id as UserId, 
          p.Score,
          DATEDIFF(day, m.FirstPostDate, v.CreationDate) as timediff
   from members m 
   join PostsWithDeleted p on m.Id = p.OwnerUserId 
   join Votes v on p.Id = v.PostId
)
select UserId,min(timediff) 
from votetimes
group by UserId

Enter Parameters

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