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!

Is there opposite of SUM function?

unknown-879931May 2 2014 — edited May 2 2014

Hi All,

I am trying to subtract current row and 1 preceding row, which analytic function should I choose? (Opposite of sum)

select a.*, SUBTRACT(endpoint_number) over(order by endpoint_number rows between 1 preceding and current row)

from user_histograms a where table_name = 'T' and column_name = 'YENI';

Regards

Charlie

This post has been answered by Solomon Yakobson on May 2 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2014
Added on May 2 2014
13 comments
7,968 views