R
Robert T
Hi:
We have a many to many application and I want a query that counts the number
of students who both registered and then actually attended the class. Those
students who registered and didn't attend will have an [attend_status] such
as "No Show" or "Cancelled". If they actually attend the class their
[Attend_Status] = "Attended".
The two tables are tblClasses and tblLink.
The two important fields in tblLink are Student_ID and [Attend_Status] and
the criteria is [Attend_Status] = "attended"
I have a query that was working, but now it's counting every student who was
originally registered, even if they didn't attend the class. Obviously we
only want to count those students whose [Attend_Status] = "attended"
The query that was working ever so briefly, but now it needs some serious
tweaking.
SELECT tblClasses.ClassNo, tblClasses.Class_Date, tblClasses.Class_Time,
tblClasses.CourseNo, tblClasses.CourseName,
Count([tbllink].[attend_status]="attended") AS [Students Attended]
FROM tblClasses INNER JOIN tblLink ON tblClasses.ClassNo = tblLink.ClassNo
GROUP BY tblClasses.ClassNo, tblClasses.Class_Date, tblClasses.Class_Time,
tblClasses.CourseNo, tblClasses.CourseName;
Thanks,
Robert
We have a many to many application and I want a query that counts the number
of students who both registered and then actually attended the class. Those
students who registered and didn't attend will have an [attend_status] such
as "No Show" or "Cancelled". If they actually attend the class their
[Attend_Status] = "Attended".
The two tables are tblClasses and tblLink.
The two important fields in tblLink are Student_ID and [Attend_Status] and
the criteria is [Attend_Status] = "attended"
I have a query that was working, but now it's counting every student who was
originally registered, even if they didn't attend the class. Obviously we
only want to count those students whose [Attend_Status] = "attended"
The query that was working ever so briefly, but now it needs some serious
tweaking.
SELECT tblClasses.ClassNo, tblClasses.Class_Date, tblClasses.Class_Time,
tblClasses.CourseNo, tblClasses.CourseName,
Count([tbllink].[attend_status]="attended") AS [Students Attended]
FROM tblClasses INNER JOIN tblLink ON tblClasses.ClassNo = tblLink.ClassNo
GROUP BY tblClasses.ClassNo, tblClasses.Class_Date, tblClasses.Class_Time,
tblClasses.CourseNo, tblClasses.CourseName;
Thanks,
Robert