SELECT SA.EMPLID ,NAME ,SA.STRM , SA.ACAD_PROG , SA.SSR_HECS_XMPT_STAT , B.SSF_INCURRAL_DT , SUM(SA.SSF_HECS_CHARGE) , SUM(SA.SSF_HECS_PAYMENT) , SUM(SA.SSF_HECS_DEFERRAL) FROM PS_SSF_SAH_RES SA , PS_SSF_SAH_DEF_TM B , PS_SCC_PRI_NAME_VW C WHERE SA.EFFDT = ( SELECT MAX(SA4.EFFDT) FROM PS_SSF_SAH_RES SA4 WHERE SA4.BUSINESS_UNIT = SA.BUSINESS_UNIT AND SA4.EMPLID = SA.EMPLID AND SA4.STRM = SA.STRM AND SA4.ACAD_CAREER = SA.ACAD_CAREER AND SA4.ACAD_PROG = SA.ACAD_PROG AND SA4.SESSION_CODE = SA.SESSION_CODE) AND C.EMPLID = SA.EMPLID AND SA.SEQ_NUM = ( SELECT MAX(SA5.SEQ_NUM) FROM PS_SSF_SAH_RES SA5 WHERE SA5.BUSINESS_UNIT = SA.BUSINESS_UNIT AND SA5.EMPLID = SA.EMPLID AND SA5.STRM = SA.STRM AND SA5.ACAD_CAREER = SA.ACAD_CAREER AND SA5.ACAD_PROG = SA.ACAD_PROG AND SA5.SESSION_CODE = SA.SESSION_CODE AND SA5.EFFDT = SA.EFFDT) AND B.STRM = SA.STRM AND B.SESSION_CODE = SA.SESSION_CODE AND B.SETID = ( SELECT SETIDSA.SETID FROM PS_SET_CNTRL_REC SETIDSA WHERE SETIDSA.RECNAME = 'SSF_SAH_DEF' AND SETIDSA.SETCNTRLVALUE = SA.BUSINESS_UNIT) GROUP BY SA.EMPLID, NAME, SA.STRM, SA.ACAD_PROG, SA.SSR_HECS_XMPT_STAT, B.SSF_INCURRAL_DT
|