I suppose the question was not clear therefore the reply by aruneeshsalhotr did not answer the qestion. I will try & simplify with an example.
Student Table : S_ID, FNAME, LNAME
Student Data :
001, Jack, Russel
002, Mark, Benny
003, John, Wayne
Unit Table : U_ID, UNITNAME
Unit Data :
MA, Maths
EN, English
SC, Science
Marks Table : S_ID, U_ID, YEAR, MARKS
Marks Data :
001, MA, 2002, 80
001, EN, 2002, 60
001, SC, 2002, 0
002, MA, 2002, 50
002, EN, 2002, 70
002, SC, 2002, 60
003, MA, 2002, 0
003, EN, 2002, 0
003, SC, 2002, 55
003, MA, 2003, 50
003, EN, 2003, 70
001, SC, 2003, 50
The Output required for the query -> find the lowest marks obtained for all units in 2002 is as follows:
FNAME, LNAME, UNITNAME, MARKS
Jack, Russel, English, 60
Mark, Benny, Maths, 50
John, Wayne, Science, 55
In the above result all those with 0 marks have been eliminated.
Is it possible to have a all in one query for the above output?