Advertisement
ma39isy

Untitled

Jul 15th, 2024
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     DISTINCT
  3.         A .SUBJECTCODE,
  4.     B.SUBJECTNAME,
  5.     D .FACULTYNAME,
  6.     D .FACULTYID,
  7.     C.STUDYPROGRAMNAME,
  8.     C.STUDYPROGRAMID,
  9.     NVL (H .TOTALCLO,
  10.     0) AS TOTALCLO,
  11.     NVL (A.CLOSTATUS,
  12.     'N') AS CLOSTATUS,
  13.     A.SCHOOLYEAR,
  14.     A.SEMESTER
  15. FROM
  16.     ACADEMIC.COURSE A
  17. JOIN SUBJECTS B ON
  18.     (A .SUBJECTID = B.SUBJECTID)
  19. JOIN MASTERDATA.STUDYPROGRAM C ON
  20.     (
  21.         B.STUDYPROGRAMID = C.STUDYPROGRAMID
  22.         )
  23. JOIN MASTERDATA.FACULTIES D ON
  24.     (C.FACULTYID = D .FACULTYID)
  25. JOIN MASTERDATA.EMPLOYEEMASTER F ON
  26.     (
  27.         F.LECTURERCODE = A .COURSECOORDINATOR
  28.         OR A.UNIVERSITYCOORDINATOR = F.LECTURERCODE
  29.         )
  30. JOIN FRAMEWORK1. USERS G ON
  31.     (G .USERNAME = F.EMPLOYEEID)
  32. LEFT JOIN (
  33.     SELECT
  34.         SUBJECTCODE,
  35.         SCHOOLYEAR,
  36.         SEMESTER,
  37.         COUNT (CLOMAPPINGID) AS TOTALCLO,
  38.         ACADEMIC.CLOPLO.STUDYPROGRAMID
  39.     FROM
  40.         ACADEMIC.CLOMAPPING
  41.     JOIN ACADEMIC.CLOCLO ON
  42.         (ACADEMIC.CLOMAPPING.CLOCLOID = ACADEMIC.CLOCLO.CLOCLOID)
  43.     JOIN ACADEMIC.CLOPLO ON
  44.         (ACADEMIC.CLOCLO.CLOPLOID = ACADEMIC.CLOPLO.CLOPLOID)
  45.     WHERE
  46.         SCHOOLYEAR = '2324'
  47.         AND SEMESTER = '1'
  48.     GROUP BY
  49.         SUBJECTCODE,
  50.         SCHOOLYEAR,
  51.         SEMESTER,
  52.         ACADEMIC.CLOPLO.STUDYPROGRAMID
  53.         ) H ON
  54.     (
  55.         A .SUBJECTCODE = H .SUBJECTCODE
  56.         AND H.STUDYPROGRAMID = C.STUDYPROGRAMID
  57.         )
  58. WHERE
  59.     1 = 1
  60.     AND C.STUDYPROGRAMID IN (32)
  61.     AND G .ACTIVATEDSTATUS = 'yes'
  62.     AND B.ACTIVESTATUS = 'YA'
  63.     AND A.SCHOOLYEAR = '2324'
  64.     AND A.SEMESTER = '1'
  65.     AND A.ACTIVATEDSTATUS = 'YA'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement