Dear All,
I have taken SQL courses three years ago and I have not use it since
then. Right now, I ran into a question. I am wondering if you could
kindly help me out:
There is a table with student_ids('sid') and professor_ids('pid'). Each
student can only have one professor as a mentor and each professor can
mentor several students. How do you find out how many students work for
each and every professor? Please provide the SQL.
Thank you very much for your help.If the pid is stored in the Student table and not in a external table
you could issue sort of this query:
Select count(*), pid
from students
Group by pid
HTH, Jens Suessmeyer.
Showing posts with label courses. Show all posts
Showing posts with label courses. Show all posts
Tuesday, March 20, 2012
Subscribe to:
Posts (Atom)