How to find the latest grade of an employee has the same id. my table is like:
+----+-------+-------+
| ID | NAME | GRADE |
| 1 | ANN | A0 |
| 1 | ANN | A3 |
| 2 | JOE | B1 |
| 3 | KIM | B3 |
| 2 | JOE | B2 |
| 3 | KIM | C1 |
| 3 | KIM | C3 |
+----+-------+-------+
How to find the latest grade of ann, Kim, and joe
my output is like:
name latestgrade
ann A3
joe B2
kim C3