intrivious
05-04-2006, 03:25 PM
Here is my setup:
==============
uploads
--------
upload_id (PK)
assignment_id (FK)
student_id (FK)
grade
==============
A student can have multiple uploads per assignment.
Having all that, I need a SELECT statement to retrieve the max number of upload records per student per assignment.
For example, jonny uploads 3 times, sally 2 times, and jack 1 time.
So, there would be 6 total records per some assignment_id.
What SELECT statement could return 3, since that is the max number uploads per student, per this assignment?
Thanks for the help.
==============
uploads
--------
upload_id (PK)
assignment_id (FK)
student_id (FK)
grade
==============
A student can have multiple uploads per assignment.
Having all that, I need a SELECT statement to retrieve the max number of upload records per student per assignment.
For example, jonny uploads 3 times, sally 2 times, and jack 1 time.
So, there would be 6 total records per some assignment_id.
What SELECT statement could return 3, since that is the max number uploads per student, per this assignment?
Thanks for the help.