I am working on a database for a student organization. One feature of the database is to record student attendance for events. If a student does not attend an event, their lack of attendance is not entered. In order for a student to attend an event they must be enrolled. The following tables are utilized for this process:
STUDENT
Student_ID int (pk),
Student_M,
First_Name,
Last_Name,
Gender,
Email,
Phone,
Degree,
Grad_Term,
Grad_Year,
STUDENT_ENROLLMENT
Enrollment_ID (pk),
Student_ID (fk),
Term,
Year,
Status,
STUDENT_ATTEND
Att_ID (pk),
Enrollment_ID (fk),
Event_ID (fk),
EVENT
Event_ID (pk),
Event_name,
Location,
Term,
Year,
Date,
Time,
Description,
Cost,
Dress_code,
Require,
My goal is to write a query that will display the lack of attendance. In this query I am trying to pull the student's name and email and the list of all events they did NOT attend which were required (WHERE event.require = 'Y'). I have tried multiple ways of writing this, many of which include numerous views, but with no luck. If anyone has any creative thoughts here it could really help!
Thanks