I have created a table (attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly (1-8hrs) every day. I have the student details in separate table (student_details).
As of now, the fields I have created in attendance_details are: attendance_no (Foreign Key which is Primary Key in the student_details table), date, hour1, hour2, hour3, hour4, hour5, hour6, hour7, hour8.
A User will only mark the absentees, and the remaining students should be marked as present.
Is this a good design, since I want the report for each day attendance based on hours of a all students in a class for every month? The Front-end is being developed C#.
Also, I need to keep track of every hour attendance.
Can you help me with the SELECT query which should generate report as below?

MySQL Database fields are shown in the pic below:
