ma39isy

Untitled

Aug 5th, 2024
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     C.SUBJECTID,
  3.     C.SUBJECTCODE,
  4.     S.SUBJECTNAME,
  5.     C.CLASS,
  6.     C.LECTURERCODE,
  7.     L.FULLNAME,
  8.             ES.UTSEXAMDATE,
  9.     SI.UTSINPUTDATE,
  10.     UTSSTUDENT,
  11.             ES.UASEXAMDATE EXAMDATE,
  12.     SI.UASINPUTDATE INPUTDATE,
  13.     UASSTUDENT,
  14.             C.ACTIVATEDSTATUS,
  15.     I.STEPNAME,
  16.     C.COURSEID,
  17.     S.SUBJECTEXCEPTION
  18. FROM
  19.     COURSE C
  20. JOIN MASTERDATA.STUDYPROGRAM ST ON
  21.     (C.STUDYPROGRAMID = ST.STUDYPROGRAMID)
  22. LEFT JOIN SUBJECTS S ON
  23.     (C.SUBJECTID = S.SUBJECTID)
  24. LEFT JOIN LECTURERTYPEVIEW L ON
  25.     (C.LECTURERCODE = L.LECTURERCODE)
  26. LEFT JOIN SCORE_EXAMSCHEDULE ES ON
  27.     (C.COURSEID = ES.COURSEID)
  28. LEFT JOIN SCOREINPUTSTATUS SI ON
  29.     (C.COURSEID = SI.COURSEID)
  30. LEFT JOIN (
  31.     SELECT
  32.         COURSEID,
  33.         MAX(STEPID) STEPID
  34.     FROM
  35.         SCOREINPUTSTEP
  36.     GROUP BY
  37.         COURSEID) SS ON
  38.     (C.COURSEID = SS.COURSEID)
  39. LEFT JOIN SCOREREGISTRATIONSTEP I ON
  40.     (SS.STEPID = I.STEPID)
  41. WHERE
  42.     C.ACTIVATEDSTATUS = 'YA'
  43.     AND C.SEMESTER = '2'
  44.     AND C.SCHOOLYEAR = '2324'
  45. ORDER BY
  46.     C.STUDYPROGRAMID,
  47.     C.SUBJECTCODE,
  48.     C.CLASS
Add Comment
Please, Sign In to add comment