Changes between Version 2 and Version 3 of UseCase0007


Ignore:
Timestamp:
09/02/26 20:34:22 (4 days ago)
Author:
236024
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase0007

    v2 v3  
    1818    ee.ee_start_time,
    1919    ee.ee_end_time
    20 FROM applications a
     20FROM holds_event_function hef
    2121JOIN event_functions ef
    22     ON ef.ee_id = a.ee_id
    23    AND ef.ef_no = a.ef_no
     22    ON ef.ee_id = hef.ee_id
     23   AND ef.ef_no = hef.ef_no
     24JOIN event_function_types eft
     25    ON eft.eft_id = ef.eft_id
    2426JOIN event_editions ee
    25     ON ee.ee_id = a.ee_id
     27    ON ee.ee_id = hef.ee_id
    2628JOIN event_types et
    2729    ON et.et_id = ee.et_id
    28 WHERE a.student_index = 230014
    29   AND a.application_type = 'event_function'
    30   AND a.application_status = 'accepted'
    31   AND ef.ef_name LIKE 'Main Organiser%'
     30WHERE hef.student_index = 230014
     31  AND eft.eft_name = 'Main Organiser'
    3232ORDER BY ee.ee_start_time DESC;
    3333}}}
     
    4343    s.first_name,
    4444    s.last_name,
    45     ef.ef_name,
     45    eft.eft_name,
    4646    a.application_type,
    4747    a.application_status,
     
    5353    ON ef.ee_id = a.ee_id
    5454   AND ef.ef_no = a.ef_no
     55LEFT JOIN event_function_types eft
     56    ON eft.eft_id = ef.eft_id
    5557WHERE a.ee_id = 8
    56 ORDER BY a.application_type, ef.ef_name, a.application_status, s.last_name, s.first_name;
     58ORDER BY a.application_type, eft.eft_name, a.application_status, s.last_name, s.first_name;
    5759}}}
    5860
     
    7779    s.first_name,
    7880    s.last_name,
    79     ef.ef_name,
     81    eft.eft_name,
    8082    a.application_type,
    8183    a.application_status
     
    8688    ON ef.ee_id = a.ee_id
    8789   AND ef.ef_no = a.ef_no
     90LEFT JOIN event_function_types eft
     91    ON eft.eft_id = ef.eft_id
    8892WHERE a.ee_id = 8
    89 ORDER BY a.application_type, ef.ef_name, a.application_status, s.last_name, s.first_name;
     93ORDER BY a.application_type, eft.eft_name, a.application_status, s.last_name, s.first_name;
    9094}}}
    9195
     
    9599SELECT
    96100    ef.ef_no,
    97     ef.ef_name,
     101    eft.eft_name,
    98102    s.student_index,
    99103    s.first_name,
    100104    s.last_name
    101105FROM event_functions ef
    102 LEFT JOIN applications a
    103     ON a.ee_id = ef.ee_id
    104    AND a.ef_no = ef.ef_no
    105    AND a.application_type = 'event_function'
    106    AND a.application_status = 'accepted'
     106JOIN event_function_types eft
     107    ON eft.eft_id = ef.eft_id
     108LEFT JOIN holds_event_function hef
     109    ON hef.ee_id = ef.ee_id
     110   AND hef.ef_no = ef.ef_no
    107111LEFT JOIN students s
    108     ON s.student_index = a.student_index
     112    ON s.student_index = hef.student_index
    109113WHERE ef.ee_id = 8
    110114ORDER BY ef.ef_no;