I have a Module and Students table as well as a linker table called Results. I am trying to display only one record of the student with the highest result for the specific module but i cannot get it to work. Here is my sql syntax so far:
SELECT S.ST_FNAME, S.ST_LNAME, M.MOD_NAME, R.RES_GRADE
FROM STUDENT S, MODULE M, RESULTS R
WHERE S.ST_ID=R.ST_ID AND M.MOD_ID=R.MOD_ID
AND M.MOD_ID=503;
At the moment it displays all the students and their results for the specific module.
help would be appreciated