Advertisement
ma39isy

Untitled

Aug 8th, 2024
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     DISTINCT
  3.                         S.STUDENTID,
  4.     S.FULLNAME,
  5.     S.CLASS,
  6.     S.CLASS2,
  7.     S.CLASS3,
  8.     F.GPA,
  9.                         S.LECTURERCODE,
  10.     S.ACTIVESTATUS,
  11.     S.STUDYPROGRAMID,
  12.                         S.STUDENTSCHOOLYEAR,
  13.     S.STUDYFIELD,
  14.     S.OUTDATE,
  15.                         S.PARTICIPANTNUMBER,
  16.     S.NOTES,
  17.     S.STUDENTTYPEID,
  18.                         S.STARTDATE,
  19.     S.CLASSIFICATIONID,
  20.     ST.STUDENTTYPENAME,
  21.     CASE
  22.         WHEN UPPER(C.CLASSIFICATIONNAME) LIKE '%INTER%CLASS%' THEN C.CLASSIFICATIONNAME
  23.         ELSE SP.STUDYPROGRAMNAME
  24.     END AS STUDYPROGRAMNAME,
  25.     ADDRESS,
  26.                         POSTALCODE,
  27.                         PROVINCENAME,
  28.     T.PHONE,
  29.                         (
  30.     SELECT
  31.         "VALUE"
  32.     FROM
  33.         MASTERDATA."ACCOUNT"
  34.     WHERE
  35.         STUDENTID = S.STUDENTID
  36.         AND INFOID IN (7, 8, 26)
  37.         AND "VALUE" IS NOT NULL
  38.         AND ROWNUM <= 1) EMAIL,
  39.                         "email_unitel" EMAILINSTITUSI,
  40.     TAK,
  41.     GENDER,
  42.     DESCRIPTIONOFSELECTIONPATH,
  43.     CASE
  44.         WHEN UPPER(C.CLASSIFICATIONNAME) LIKE '%INTER%CLASS%'
  45.         OR S.STUDYPROGRAMID = 40
  46.         OR UPPER(SP.STUDYPROGRAMNAME) LIKE '%INTER%CLASS%' THEN 'KELAS INT'
  47.         WHEN UPPER(C.CLASSIFICATIONNAME) LIKE '%PINDAHAN%'
  48.         OR UPPER(SP.STUDYPROGRAMNAME) LIKE '%PINDAHAN%' THEN 'PINDAHAN'
  49.         ELSE 'REGULER'
  50.     END AS PROGRAMTYPE,
  51.     AD.NATIONALITY ,
  52.     TO_CHAR (
  53.                         AD.BIRTHDATE,
  54.                         'DD-MM-YYYY'
  55.                     ) BIRTHDATE,
  56.     YUDISIUMSTATUS,
  57.     ETHNIC
  58. FROM
  59.     MASTERDATA.STUDENT S
  60. LEFT JOIN MASTERDATA.ADDITIONALSTUDENTDATA AD ON
  61.     (S.STUDENTID = AD.STUDENTID)
  62. LEFT JOIN MASTERDATA.STUDENTTYPE ST ON
  63.     (S.STUDENTTYPEID = ST.STUDENTTYPEID)
  64. LEFT JOIN MASTERDATA.STUDYPROGRAM SP ON
  65.                         (S.STUDYPROGRAMID = SP.STUDYPROGRAMID)
  66. LEFT JOIN MASTERDATA.STUDENTSFAMILY SF ON
  67.     (S.STUDENTID = SF.STUDENTID
  68.         AND
  69.                         RELATIONSHIP IN('FATHER', 'ORANG TUA', 'AYAH')
  70.             AND ADDRESS IS NOT NULL)
  71. LEFT JOIN MASTERDATA.PROVINCES P ON
  72.     (SF.PROVINCE = TO_CHAR(P.PROVINCEID))
  73. LEFT JOIN (
  74.     SELECT
  75.         ROUND(SUM(MULTIPLYCREDITCONVERSION)/ SUM(CREDIT), 2) AS GPA,
  76.         STUDENTID
  77.     FROM
  78.         FINALGRADE
  79.     WHERE
  80.         (INDEXPOINT IS NOT NULL
  81.             AND INDEXPOINT <> 'T')
  82.         AND STATUSFASTRACK IS NULL
  83.     GROUP BY
  84.         STUDENTID) F ON
  85.     (F.STUDENTID = S.STUDENTID)
  86. LEFT JOIN (
  87.     SELECT
  88.         MAX("VALUE") PHONE,
  89.         STUDENTID
  90.     FROM
  91.         MASTERDATA."ACCOUNT"
  92.     WHERE
  93.         INFOID = 22
  94.     GROUP BY
  95.         STUDENTID) T
  96.                         ON
  97.     (T.STUDENTID = S.STUDENTID)
  98. LEFT JOIN MASTERDATA.STUDENT_TOKEN ON
  99.     (S.STUDENTID = "nim")
  100. LEFT JOIN (
  101.     SELECT
  102.         STUDENTID,
  103.         SUM(MHS_POINT) TAK
  104.     FROM
  105.         TAK.VIEW_STUDENT_TAK
  106.     GROUP BY
  107.         STUDENTID) TA ON
  108.     (S.STUDENTID = TA.STUDENTID)
  109. LEFT JOIN ADMISSION.SELECTIONPATHS ON
  110.     (SELECTIONPATH = SELECTIONPATHID)
  111. LEFT JOIN MASTERDATA.STUDYPROGRAMCLASSIFICATION C ON
  112.     (S.CLASSIFICATIONID = C.CLASSIFICATIONID)
  113. LEFT JOIN (
  114.     SELECT
  115.         STUDENTID,
  116.         ACADEMICCOUNCILNAME,
  117.         YUDISIUMSTATUS
  118.     FROM
  119.         ACADEMIC.ACADEMICSTATUS
  120.     WHERE
  121.         ACADEMICCOUNCILNAME IN ('DIPLOMA', 'SARJANA', 'MAGISTER')
  122.             AND ACADEMICCOUNCILDATE IS NOT NULL) AC ON
  123.     (S.STUDENTID = AC.STUDENTID)
  124. LEFT JOIN (
  125.     SELECT
  126.                                 STUDENTID,
  127.                                 TRIM (ETHNIC) ETHNIC
  128.     FROM
  129.                                 ADMISSION.PARTICIPANT
  130.     JOIN ADMISSION.ADDITIONALPARTICIPANTDATA
  131.             USING (PARTICIPANTID)
  132.     WHERE
  133.                                 STUDENTID IS NOT NULL
  134.                         ) AE ON
  135.     (S.STUDENTID = AE.STUDENTID)
  136. WHERE
  137.     SP.FACULTYID IN (
  138.     SELECT
  139.         FACULTYID
  140.     FROM
  141.         ACADEMIC.USEROFFACULTY
  142.     WHERE
  143.         USERID = '166607')
  144. ORDER BY
  145.     S.STUDENTID ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement