SELECT B.CONTRACT_NUM , D.BILL_PLAN_ID , B.FOREIGN_CURRENCY , SUM(B.FOREIGN_AMOUNT) FROM PS_CA_PROJ_SUMMARY B , PS_CA_DETAIL D , PS_CA_DETAIL_PROJ C , PS_CA_CONTR_HDR E , PS_CA_BILL_PLAN A WHERE C.CONTRACT_NUM = B.CONTRACT_NUM AND C.BUSINESS_UNIT_PC = B.BUSINESS_UNIT_PC AND C.PROJECT_ID = B.PROJECT_ID AND C.ACTIVITY_ID = B.ACTIVITY_ID AND D.CONTRACT_NUM = C.CONTRACT_NUM AND D.CONTRACT_LINE_NUM = C.CONTRACT_LINE_NUM AND C.CONTRACT_NUM = E.CONTRACT_NUM AND A.CONTRACT_NUM = B.CONTRACT_NUM AND A.BILL_PLAN_ID = D.BILL_PLAN_ID GROUP BY B.CONTRACT_NUM, D.BILL_PLAN_ID, B.FOREIGN_CURRENCY
|