Using the following data (that is different from yours):
TheName LeaveM DateEnd Id
Folic 5 MG 2 8/6/2021 1
Folic 10 MG 3 4/6/2021 2
Esc 10 MG 4 1/6/2021 3
Folic 10 MG 5 5/6/2021 4
Folic 10 MG 2 6/6/2021 5
Folic 10 MG 1 7/6/2021 6
Esc 10 MG 1 2/6/2021 7
Esc 10 MG 3 3/6/2021 8
Esc 10 MG 4 3/6/2021 9
The following:
SELECT DISTINCTROW Medical.TheName, Sum(Medical.LeaveM) AS [Sum Of LeaveM]
FROM Medical
GROUP BY Medical.TheName;
Produces:
TheName Sum Of LeaveM
Esc 10 MG 12
Folic 10 MG 11
Folic 5 MG 2