jwoker
08-18-2005, 09:03 PM
I need a query to return a list of courses which have not reached the enrollment capacity. So it will need to count the number of user/course pairs in student with a given courseid and select the fullname of courses that have not reached their capacity.
students.userid
students.courseid
course.id
course.fullname
course.capacity
query = SELECT fullname FROM course WHERE - The sum of students.userid with course.id < course.capacity
Can anybody help?
students.userid
students.courseid
course.id
course.fullname
course.capacity
query = SELECT fullname FROM course WHERE - The sum of students.userid with course.id < course.capacity
Can anybody help?