Hi Folks,
I am in a little over my head with how to do this. I think it is easy but I can't figure it out...
I have a Student Report Card (ProgressReport) based on a query for all Active students (currently) enrolled. Theses students have attendance data that goes back to 2012-2013. I need to limit the calulation to AttendanceDates of <01-Sept-2013. That way the AttendanceAverage for each course currently enrolled in will only show an average for attendance data since september.
Here is the SQL. I'm not sure if it enough to make sense of my problem and question.
Thanks in advance!
SELECT ContactInformation.StudentNumber, ContactInformation.FirstName, ContactInformation.LastName, ContactInformation.Address1, ContactInformation.Address2, ContactInformation.Address3, ContactInformation.Town, ContactInformation.Province, ContactInformation.PostalCode, ContactInformation.FacultyAdvisor, ContactInformation.Active, StudentEnrollmentTable.CourseStatus, StudentEnrollmentTable.Progress, StudentEnrollmentTable.GradeToDate, StudentEnrollmentTable.Comment, CoursesNEW.[Course Title], SectionNEW.[Class Section], [LU_Instructor]![LastName] & ", " & [LU_Instructor]![FirstName] AS InstructorName, Sum(StudentAttendance1.ClassesAttended) AS SumOfClassesAttended, Sum(StudentAttendance1.ClassesOffered) AS SumOfClassesOffered, FormatPercent(Sum([StudentAttendance1]![ClassesAttended])/Sum([StudentAttendance1]![ClassesOffered]),0) AS AttAvg, ContactInformation.MiddleName
FROM (SectionNEW INNER JOIN (LU_Instructor INNER JOIN (CoursesNEW INNER JOIN (ContactInformation INNER JOIN (AnnualClassNumbers1 INNER JOIN StudentEnrollmentTable ON AnnualClassNumbers1.ID = StudentEnrollmentTable.AnnualClassNumberID) ON ContactInformation.StudentNumber = StudentEnrollmentTable.StudentNumber) ON CoursesNEW.PKCourseID = AnnualClassNumbers1.FKCourseInventoryID) ON LU_Instructor.InstructorID = AnnualClassNumbers1.FKInstructorID) ON SectionNEW.PKSectionID = AnnualClassNumbers1.FKSectionID) INNER JOIN StudentAttendance1 ON StudentEnrollmentTable.ID = StudentAttendance1.FKStudentEnrollmentID
GROUP BY ContactInformation.StudentNumber, ContactInformation.FirstName, ContactInformation.LastName, ContactInformation.Address1, ContactInformation.Address2, ContactInformation.Address3, ContactInformation.Town, ContactInformation.Province, ContactInformation.PostalCode, ContactInformation.FacultyAdvisor, ContactInformation.Active, StudentEnrollmentTable.CourseStatus, StudentEnrollmentTable.Progress, StudentEnrollmentTable.GradeToDate, StudentEnrollmentTable.Comment, CoursesNEW.[Course Title], SectionNEW.[Class Section], [LU_Instructor]![LastName] & ", " & [LU_Instructor]![FirstName], ContactInformation.MiddleName
HAVING (((ContactInformation.Active)=1 Or (ContactInformation.Active)=3 Or (ContactInformation.Active)=4));