create table 
as
select deptno ""
     , row_number() over (partition by deptno order by empno) "Ǹſ"
     , round(dbms_random.value(500, 1000)) ""
from   emp
order by deptno ;

select , Ǹſ, 
     , sum() over (partition by  order by Ǹſ 
             range between unbounded preceding and current row) 
from   ;

select t1., t1.Ǹſ, min(t1.) , sum(t2.) 
from    t1,  t2
where  t2. = t1.
and    t2.Ǹſ <= t1.Ǹſ
group by t1., t1.Ǹſ
order by t1., t1.Ǹſ;


