This is how my Attendance data looks like:
Date TeachersName Student1 Student2 Student3 Student4 Student5 Student6 Student7 Student8 Student9
March 1, 2021 ABC 1 1 1
March 1, 2021 DEF 1 0 1
March 1, 2021 GHI 1 1 1
March2, 2021 ABC 1 0 1
March 2, 2021 DEF 1 1 1
March 2, 2021 GHI 1 0 0
March 3, 2021 ABC 1 0 1
March 3, 2021 DEF 1 0 0
March 3, 2021 GHI 1 1 1
March 4, 2021 ABC 1 1 1
March 4, 2021 DEF 1 1 1
March 4, 2021 GHI 1 1 0
I would like to display result as:
TeachersName Day1 Day2 Day3 Day4 Day5 Day6 1st Week Average
ABC 3 2 2 3 display average student in a class in a week
DEF 2 3 1 3
GHI 3 1 3 2
For any teacher who has attendance for a particular day less than 2, I would like to display it in table format as:
Day 1 TeachersName Total Students Present
1 - -
2 GHI 1
3 DEF 1
4 - -
If class attendance (attendance of student under one fellow) is less than 2. The attendance of all the attendance in that class is not counted. (i.e. for a attendance of a student to count class attendance should be at least 2)

Considering this I would like to construct a table similar to:
Student Day1 Day2 Day3 Day4 Day5 Day6 1st Week total
Student1 1 2 3 4 display attendance of 6th day
Student2 1 0 0 2
Student3 1 2 3 4
Student4 1 2 0 3
Student5 0 1 0 2
Student6 1 2 0 3
Student7 1 0 2 3
Student8 1 0 2 3
Student9 1 0 2 0
I would like to express my sincere thanks to all, who can help me out on this to solve this problem.