Re: shortest time between the entries of each user
> I am not sure if it is allowed here to ask help concerning a concrete query
Sure is.
> query which shows for each users, which was the shortest time between their entries
One way assuming a table t(t timestamp, user int) ...
select t.user, min(diff)
from (
select t.user, unix_timestamp(tnext.t)-unix_timestamp(t.t) as diff
from t
join t as tnext on t.user=tnext.user and t.t<tnext.t
group by t.user, t.t
) as t
group by user;
Subject
Written By
Posted
December 03, 2014 06:24AM
Re: shortest time between the entries of each user
December 03, 2014 10:33AM
December 03, 2014 12:59PM
December 03, 2014 01:10PM
December 03, 2014 01:26PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.