Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Duplicate rows in over partition by

movilogoJun 24 2010 — edited Jun 24 2010
select * from zzz

id	amt
1	10
1	20
2	5
2	6
3	10


select id, sum(amt) over (partition by id order by id) sum from zzz

1	30
1	30
2	11
2	11
3	10
Why I'm getting duplicate rows??

Can't use distinct or group by as this is just a small demo and I'll be using my query as part of another complex join.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2010
Added on Jun 24 2010
8 comments
5,912 views