Well, I'm "stuck" on a problem with a client report.
I have the following relationship:
- Module (id, name)
- Associate (id, name, upper_id)
- Associates_Modules (modulo_id, associated_id, class, enrolled, attending, dropping)
What I need to do is: list all modules relative to a "superior_id" , with the following information:
- How many classes belong to this module = Here is the first problem: Class is a varchar .. just a description, for example: Class 45 from 08:00 a.m. to 9:00 p.m.
- how many associated with this module are present
- how many associates pertaining to this module are enrolled
- how many associated with this module have given up
In short: I do not know the best way to do this relationship (many to many?), and what better way to do this query, mainly because the class is a varchar and not a any module (which I could do a count through the default relationship).
Any information you need let me know.