Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT ROWNUM
- ID,
- INDEXPOINT,
- STUDENTID,
- FULLNAME,
- CREDIT,
- SUBJECTCODE,
- SUBJECTNAME,
- SEMESTERALL,
- 'OLD' TYPE
- FROM
- (
- SELECT
- F.*,
- SUBSTR( S.ADMITSCHOOLYEAR, 2, 1 ) AS SEMESTERALL,
- CASE
- WHEN INDEXPOINT <= MINIMUMGRADE THEN
- 'LULUS' ELSE 'TIDAK LULUS'
- END STAT
- FROM
- FINALGRADE F
- JOIN MASTERDATA.STUDENT MS ON ( MS.STUDENTID = F.STUDENTID )
- LEFT JOIN SUBJECTS S ON F.SUBJECTID = S.SUBJECTID
- AND F.SUBJECTCODE = S.SUBJECTCODE
- AND F.COURSESTUDYPROGRAMID = S.STUDYPROGRAMID
- WHERE
- F.STUDENTID = '104022380339'
- )
- WHERE
- STAT = 'LULUS' UNION
- SELECT
- *
- FROM
- (
- SELECT ROWNUM
- ID,
- T.NEWINDEXPOINT,
- T.STUDENTID,
- ST.FULLNAME,
- S.CREDIT,
- M.SUBJECTCODE,
- S.SUBJECTNAME,
- SUBSTR( S.ADMITSCHOOLYEAR, 2, 1 ) AS SEMESTERALL,
- 'NEW'
- FROM
- EQUIVALENCYMAPPINGTEMPORARY T
- LEFT JOIN MASTERDATA.STUDENT ST ON ( T.STUDENTID = ST.STUDENTID )
- LEFT JOIN EQUIVALENCYSUBJECTMAPPING M ON ( T.EQUIVALENCYSUBJECTID = M.EQUIVALENCYSUBJECTID AND ST.STUDYPROGRAMID = M.STUDYPROGRAMID )
- LEFT JOIN SUBJECTS S ON ( M.SUBJECTID = S.SUBJECTID AND M.SUBJECTCODE = S.SUBJECTCODE AND M.STUDYPROGRAMID = S.STUDYPROGRAMID )
- WHERE
- T.STUDENTID = '104022380339'
- AND T.NEWINDEXPOINT IS NOT NULL
- )
- ORDER BY
- SEMESTERALL ASC,
- SUBJECTNAME ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement