Hi All,
I have students' different term grade of different years. Each year has four terms (R1, R2, R3, R4). Any time of the year when I will run the report, students may or may not have the grade available for all terms of the current year (let's say in the following case only R1 & R2 is available, but
not R3 and R4).
Can anyone write the code for me so that I get the following:
- All R4 grades of the previous years,
- All grades of the latest term of current year (eg: if R1,R2 & R3 availble, I want R3).
- Some later terms of the current years will appear with blank data, I want to remove them too. (eg: R3 and R4 is the available in the case below)
- All Dec Marks should be removed.
Can somebody help please.
| Studuent_ID | Grade | Term | Session |
| 23233 | 75 | R4 | 2012-2013 |
| 44354 | 75 | R4 | 2014-2015 |
| 44354 | 75 | Dec Marks | 2015-2016 |
| 11232 | R4 | 2015-2016 | |
| 23233 | 72 | R4 | 2014-2015 |
| 23233 | 75 | R2 | 2015-2016 |
| 11232 | 84 | R4 | 2014-2015 |
| 22321 | 80 | R4 | 2014-2015 |
| 11232 | 84 | R4 | 2012-2013 |
| 22321 | 74 | R1 | 2015-2016 |
| 44354 | 83 | R1 | 2015-2016 |
| 22321 | 84 | R2 | 2015-2016 |
| 44354 | R4 | 2015-2016 | |
| 22321 | 82 | Dec Marks | 2015-2016 |
| 23233 | 77 | R1 | 2015-2016 |
| 11232 | 77 | R1 | 2015-2016 |
| 44354 | 76 | R2 | 2015-2016 |
| 22321 | R4 | 2015-2016 | |
| 11232 | 78 | Dec Marks | 2015-2016 |
| 23233 | 78 | R2 | 2015-2016 |