I have the following table
Name Subject Month Year
----- ----------- ----- ----
Raju History 1 2011
Ravi Chemistry 10 2010
Raju Computers 12 2011
Raju Physics 10 2010
Raju English 6 2011
Ravi Mathematics 10 2010
Sunil English 5 2011
Raju History 5 2011
Raju History 6 2011
I want the result as follows
Name Subject Latest_Month_Attended Latest_Year_Attended
----- ----------- --------------------- --------------------
Raju History 6 2011
Raju Computers 12 2011
Raju Physics 10 2010
Raju English 6 2011
Ravi Chemistry 10 2010
Ravi Mathematics 10 2010
Sunil English 5 2011
I want to find the latest month and year for the particular student and Subject
Please help me to get the above result
Try this (edited):