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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Completion of data series by analytical function

568211Oct 13 2007 — edited Oct 15 2007
have the pleasure of learning the benefits of analytical functions and hope to get some help

The case is as follows:
Different projects gets funds from different sources over several years, but not from each source every year.
I want to produce the cumulative sum of funds for each source for each year for each project, but so far I have not been able to do so for years without fund for a particular source.

I have used this syntax:

SUM(fund) OVER(PARTITION BY project, source ORDER BY year ROWS UNBOUNDED PRECEDING)
I have also experimented with different variations of the window clause, but without any luck.

This is the last step in a big job I have been working on for several weeks, so I would be very thankful for any help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2007
Added on Oct 13 2007
9 comments
2,898 views