Distribution of time untill first vote.


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for Joomla! administrators, users, developers and designers

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, 
          DATEDIFF(hh, 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

Switch sites:
loading Hold tight while we fetch your results