Advertisement
ma39isy

Untitled

Sep 28th, 2023 (edited)
997
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT ROWNUM
  2.     ID,
  3.     INDEXPOINT,
  4.     STUDENTID,
  5.     FULLNAME,
  6.     CREDIT,
  7.     SUBJECTCODE,
  8.     SUBJECTNAME,
  9.     SEMESTERALL,
  10.     'OLD' TYPE
  11. FROM
  12.     (
  13.     SELECT
  14.         F.*,
  15.         SUBSTR( S.ADMITSCHOOLYEAR, 2, 1 ) AS SEMESTERALL,
  16.     CASE
  17.            
  18.             WHEN INDEXPOINT <= MINIMUMGRADE THEN
  19.             'LULUS' ELSE 'TIDAK LULUS'
  20.         END STAT
  21. FROM
  22.     FINALGRADE F
  23.     JOIN MASTERDATA.STUDENT MS ON ( MS.STUDENTID = F.STUDENTID )
  24.     LEFT JOIN SUBJECTS S ON F.SUBJECTID = S.SUBJECTID
  25.     AND F.SUBJECTCODE = S.SUBJECTCODE
  26.     AND F.COURSESTUDYPROGRAMID = S.STUDYPROGRAMID
  27. WHERE
  28.     F.STUDENTID = '104022380339'
  29.     )
  30. WHERE
  31.     STAT = 'LULUS' UNION
  32. SELECT
  33.     *
  34. FROM
  35.     (
  36.     SELECT ROWNUM
  37.         ID,
  38.         T.NEWINDEXPOINT,
  39.         T.STUDENTID,
  40.         ST.FULLNAME,
  41.         S.CREDIT,
  42.         M.SUBJECTCODE,
  43.         S.SUBJECTNAME,
  44.         SUBSTR( S.ADMITSCHOOLYEAR, 2, 1 ) AS SEMESTERALL,
  45.         'NEW'
  46.     FROM
  47.         EQUIVALENCYMAPPINGTEMPORARY T
  48.         LEFT JOIN MASTERDATA.STUDENT ST ON ( T.STUDENTID = ST.STUDENTID )
  49.         LEFT JOIN EQUIVALENCYSUBJECTMAPPING M ON ( T.EQUIVALENCYSUBJECTID = M.EQUIVALENCYSUBJECTID AND ST.STUDYPROGRAMID = M.STUDYPROGRAMID )
  50.         LEFT JOIN SUBJECTS S ON ( M.SUBJECTID = S.SUBJECTID AND M.SUBJECTCODE = S.SUBJECTCODE AND M.STUDYPROGRAMID = S.STUDYPROGRAMID )
  51.     WHERE
  52.         T.STUDENTID = '104022380339'
  53.         AND T.NEWINDEXPOINT IS NOT NULL
  54.     )
  55. ORDER BY
  56.     SEMESTERALL ASC,
  57.     SUBJECTNAME ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement