select * from ttta;
X
Y
-------------------- ----------
f
6
e
5
d
4
c
3
b
2
a
1
6 rows selected
SQL> select x,y,sum(y) over(order by x) from ttta;
X
Y SUM(Y)OVER(ORDER
-------------------- ---------- ------------------------------
a
1
1
b
2
3
c
3
6
d
4
10
e
5
15
f
6
21
6 rows selected