Hi, I'm trying to display a table showing a list of courses. I would like to include a column which shows the number of people who have completed the course and if possible, also the number who have yet to complete it.
My table structure is like so:
Courses
courseid | title | etc
Studying
courseid | studentid | some other fields | has_completed
Ideally the output should be something like this for example:
Course Title | some other fields | Students completed | Students not completed
Something etc 5 3
I'm having difficulty getting the two separate fields counted. Can anyone recommend a good way to do this?
Any advice appreciated, thanks.