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!

monthly average

hemuOct 17 2012 — edited Oct 18 2012
hi
i am using 10g
i would like to calculate monthly average bal from the given data for the period 01-apr-2009 to 31-mar-2010
create table tx
(branch number(6),acno number(8),balanceDate date,balance number (13,2));
--======
insert into tx values (16,1,to_date('15-mar-09','dd-mon-yyyy'),15000)
insert into tx values (16,1,to_date('11-OCT-09','dd-mon-yyyy'),5000)
insert into tx values (16,1,to_date('01-jan-10','dd-mon-yyyy'),11000)
insert into tx values (16,1,to_date('03-mar-10','dd-mon-yyyy'),11093)
insert into tx values (16,1,to_date('20-mar-10','dd-mon-yyyy'),11090.79)
expected result is
branch      acno      month-year     averageBalance
i could able to calculate daily average but not able to calculate montly average particularly for missing months in a given period......please help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2023
Added on Oct 17 2012
9 comments
1,211 views