seenall
asked on
cumulative calculation with partition by
Typical record set as follows
Friend1 01/01/2009 5
Friend1 03/01/2009 4
Friend1 07/01/2009 6
Friend1 09/01/2009 3
Friend1 12/01/2009 6
Friend1 13/01/2009 4
Now - I want to find the first date when the accumulated timespent is equal or greater than 20. - so in the example above on 12 January the accumulated time was 24
The query should then halt at 12 and move onto the next friend.
Might this be done with an Analytical function? - I am using Oracle RDBMS with Data Warehousing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much for this - I think I understand the partition by statement now - until the next time :D - Great work
glad I could help. analytics are definitely an awesome set of tools to learn.
This should help you out..
Open in new window