SELECT DISTINCT C.OPRID , B.BUSINESS_UNIT , B.CONTRACT_NUM , A.BUDGET_PERIOD_GM , MIN(A.START_DT) , MAX(A.END_DT) FROM PS_GM_PT_PRJ_BUD A , PS_GM_PT_ACC_LVL2 B , PSOPRDEFN C , PS_GM_PT_PROJECT D WHERE C.EMPLID = B.EMPLID AND B.AWARD_FLAG = 'Y' AND (B.END_DT >= %CurrentDateIn OR B.END_DT IS NULL) AND D.CONTRACT_NUM = B.CONTRACT_NUM AND D.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.BUSINESS_UNIT_PC = D.BUSINESS_UNIT_PC AND A.PROJECT_ID = D.PROJECT_ID GROUP BY C.OPRID, B.BUSINESS_UNIT , B.CONTRACT_NUM, A.BUDGET_PERIOD_GM
|