Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can someone simplify this query
Use this query, this should work.
select a.officecode off1, a.acno_code acc1,
sum(current_purchase_amount) over (partition by a.office_code, a.acno_code) as sum1,
b.officecode off2, b.account_code acc2, sum(org_budget_amt) over (partition by b.account_code, b.office_code) as sum3, sum(rev_budget_amt) over (partition by b.account_code,b.office_code) as sum4
![]() |
![]() |