I have the following data in my database:
|ID | Name | date | Category
+---+-------+----------+----------+
|1 | John |2022-12-01| CAT1
|2 | John |2022-12-05| CAT1
|3 | John |2022-12-12| CAT2
|4 | Artie |2022-12-13| CAT1
|5 | Artie |2022-12-13| CAT2
|6 | Artie |2022-12-14| CAT2
I need to get the latest date for each category per person e.g:
|ID | Name | date | Category
+---+-------+----------+----------+
|2 | John |2022-12-05| CAT1
|3 | John |2022-12-12| CAT2
|4 | Artie |2022-12-13| CAT1
|6 | Artie |2022-12-14| CAT2
is this possible? i have tried using groups by multiple columns but cannot figure it out.
Retrieving the last record in each group - MySQL
i am not sure how to implement the answers from this