SELECT A.BUSINESS_UNIT , A.PROJECT_ID , D.ACTIVITY_ID , SUM(D.FOREIGN_AMOUNT) AS PLANNED_BUDGET FROM PS_PROJECT A , PS_PC_BUD_PLAN BP , PS_PC_BUD_DETAIL D , PS_BUS_UNIT_TBL_PC P WHERE A.BUSINESS_UNIT = P.BUSINESS_UNIT AND A.EFF_STATUS = 'P' AND A.BUSINESS_UNIT = BP.BUSINESS_UNIT AND A.PROJECT_ID = BP.PROJECT_ID AND BP.PC_BUDGET_STATUS = '1' AND BP.PC_BUD_TYPE = 'C' AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.PROJECT_ID = D.PROJECT_ID AND BP.PC_BUDGET_ID = D.PC_BUDGET_ID AND D.FOREIGN_CURRENCY = P.CURRENCY_CD GROUP BY A.BUSINESS_UNIT, A.PROJECT_ID, D.ACTIVITY_ID
|