Hi
I have stucked in this query for quite some time.
My table as follows
StudentID Result ResultRating LastUpdate
------------------------------------------------------------------------
StudentA 60 Average 6 June 2008
StudentA 80 Good 20 June 2008
StudentB 10 Bad 6 June 2008
StudentB 50 Average 20 June 2008
StudentB 100 Good 08 July 2008
StudentC 100 Good 08 July 2008
StudentB 50 Average 10 July 2008
------------------------------------------------------------------------
How can I get the total number of student attaining "Good", "Average", "Bad" in each month, assuming we will only take the highest rating for each student. For example, June StudentA, will be a "Good" Student.
The result will be as follows
Number of Students ResultRating Month
------------------------------------------------------------------------
1 Good June
1 Average June
0 Bad June
2 Good July
0 Average July
0 Bad July
------------------------------------------------------------------------
Hope someone could help .. Thank you in advanced.
|