SELECT A.SSR_ACTIVITY_ID , A.INSTITUTION , E.SUBJECT , E.CATALOG_NBR , A.SSR_CW_EXAM_TYPE , B.DESCR50 , A.SSR_PERIOD_ID , C.SSR_PRD_START_DT , C.SSR_PRD_END_DT FROM PS_SSR_ACMEXAM_EXT A , PS_SSR_ACMCONT_ITM B , PS_SSR_PERIOD_TBL C , PS_SSR_ACT_XREF D , PS_CRSE_OFFER E , PS_SSR_EXAM_PRD_VW F WHERE B.INSTITUTION = A.INSTITUTION AND B.SSR_ACTIVITY_ID = A.SSR_ACTIVITY_ID AND C.INSTITUTION = A.INSTITUTION AND C.SSR_PERIOD_ID = A.SSR_PERIOD_ID AND D.SSR_ACTIVITY_ID = A.SSR_ACTIVITY_ID AND E.CRSE_ID = D.CRSE_ID AND E.CRSE_OFFER_NBR = D.CRSE_OFFER_NBR AND E.EFFDT = ( SELECT MAX(E2.EFFDT) FROM PS_CRSE_OFFER E2 WHERE E2.CRSE_ID = E.CRSE_ID AND E2.CRSE_OFFER_NBR = E.CRSE_OFFER_NBR AND E2.EFFDT <= C.SSR_PRD_START_DT) AND A.INSTITUTION = F.INSTITUTION AND A.SSR_PERIOD_ID = F.SSR_PERIOD_ID AND F.SSR_EXAMPRD_TYPE = 'RES'
|