I have a MySQL database containing the following tables:
Table: Professor
Attributes: ID, ProfessorName
Table: Class
Attributes: ID, ClassName, SubjectID (secondary)
Table: Subject
Attributes: ID, SubjectName
Table: DocCategory
Attributes: ID, DocCategoryName
Table: Document
Attributes: ID, DocName, ProfessorID (secondary), ClassID (secondary), DocCategoryID (secondary)
Can someone point me in the right direction with a query so that I get a report containing:
a list of all ProfessorName with a second column containing a count for documents in the document table related to that professor?
Thanks in advance!
Use:
To see a list of all professors — those without documents will list a value of zero — use: