|
I'm looking for suggestion on how to approach generating reports from a DB.
Here is a high view of the tables that the report is generated from.
tblCourse
courseID, coursetitle, blah
tblOffering
offeringID, offeringDate, courseID, offeringsize, blah
tblOfferingStudentLookup
offeringID, studentID, blah
tblstudent
studentID, studentName, blah
Users would enter a date range in a form to generate the report.
My issue is if courseA is delivered multiple times during within the date range, I still only want the report to list course A with the totals of the offeringsize, and total of the number of students attended. As opposed to having every offering listed.
What I can get is:
Course A, 16, 15
Course A, 20, 18
Course A, 8, 10
Course A, 14, 14
Course B, 10, 10
Course B, 12, 11
What I want to get is:
Course A, 58, 57
Course B, 12, 11
Any suggestions or sample code would be greatly appreciated. Thanks
|