SQL> select * from p1; ID A B C I ---------- ---------- ---------- ---------- ---------- 1 one test1 test2 5 2 two test1 test3 3 3 three test1 test4 8 4 three test1 test4 10 SQL> select a,b,sum(i) over (partition by a) from p1 ; A B SUM(I)OVER(PARTITIONBYA) ---------- ---------- ------------------------ one test1 5 three test1 18 three test1 18 two test1 3 SQL> select a,b,sum(i) over (partition by b) from p1 ; A B SUM(I)OVER(PARTITIONBYB) ---------- ---------- ------------------------ one test1 26 three test1 26 three test1 26 two test1 26 SQL>