1

Topic: Re: as it is better to define idle time/work time

_;
Begin from here:
to the Students, wishing the help
Here Tostye   are not found
That to you helped, it is necessary to show that you made something.
To prepare the test data and the masterpiece, with the exact description of that it would be desirable and that it is impossible
More conveniently in a type

-- Generation of the test data
with logw (rn, op, user, mytime) as (
select 1,1, ' user1 ', to_date (' 11/17/2017 OF 10:33:22 AM ', ' DD.MM.YYYY HH24:MI:SS') from dual union all
select 2,2, ' user1 ', to_date (' 11/17/2017 OF 10:36:22 AM ', ' DD.MM.YYYY HH24:MI:SS') from dual union all
...
)
-- Other tables if it is necessary
, rezult (rn, user, timew, timei) as (
select 1, ' user1 ', 4,1 from dual union all
...
)
-- That that turned out at you
select...

For example, in what units 4,1?

2

Re: Re: as it is better to define idle time/work time

_;
Search on the total of intervals

3

Re: Re: as it is better to define idle time/work time

If speech not about the educational task the first problem - the output fact can be not fixed.
At least, it is necessary to add "autooutput" on any rule set (, the end of the working day, etc.)
If a question on how to collect - that or look on a forum for one million examples of application start_of_group, or pl/sql.
If the version allows - that https://docs.oracle.com/database/121/DW … #DWHSG8956
Also it is possible to solve recursive with subquery factoring, connect by and self-connection.