Π‘ΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ΅
π¨βπ»ΠΡΠ²Π΅Ρ Π½Π° Π·Π°Π΄Π°ΡΠΊΡ select t.user_name, min(t.etime) keep (dense_rank first order by t.sum_conn desc) min_time, max(sum_conn) max_conn from (select user_name, etime, typ, sum(case when typ = 'Y' then 1 else -1 end) over (partition by user_name order by etime range unbounded preceding) sum_conn from (select user_name, logon_time etime, 'Y' typ from t_logon_journal union all select user_name, logoff_time etime, 'N' typ from t_logon_journal where logoff_time is not null)) t group by t.user_name βΊΠ’Π²ΠΎΠΉ ΠΎΡΠ²Π΅Ρ Π±ΡΠ» ΡΠ°ΠΊΠΈΠΌ ΠΈ ΡΡ ΡΠ΅ΡΠΈΠ» Π·Π°Π΄Π°ΡΡ Π² ΡΠ΅ΡΠ΅Π½ΠΈΠΈ ΠΏΠΎΠ»ΡΡΠ°ΡΠ°? Π’ΠΎΠ³Π΄Π° ΡΠΌΠ΅Π»ΠΎ ΠΎΡΠΊΠ»ΠΈΠΊΠ°ΠΉΡΡ Π½Π° Π²Π°ΠΊΠ°Π½ΡΠΈΡ Π Π°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊ Oracle (PL/SQL) ΠΠΎΠΊΠ°ΡΠΈΠΈ: ΠΠΎΠ²ΠΎΡΠΈΠ±ΠΈΡΡΠΊ, Π’ΠΎΠΌΡΠΊ, Π₯Π°Π±Π°ΡΠΎΠ²ΡΠΊ, ΠΡΠ°ΡΠ½ΠΎΡΡΡΠΊ, ΠΠΊΠ°ΡΠ΅ΡΠΈΠ½Π±ΡΡΠ³, ΠΡΠ°ΡΠ½ΠΎΠ΄Π°Ρ, Π ΠΎΡΡΠΎΠ²-Π½Π°-ΠΠΎΠ½Ρ