adding total group by user

Hi Team

I am seeking for a help to achieve total for each user as below

Input table

| col1  | col2 |
| Test  | 20   |
| Test  | 20   |
| Tes1  | 30   |
| test1 | 30   |

output email should be

Email to Test user

| col1          | col2 |
| Test          | 20   |
| Test          | 20   |
| Total of Test | 40   |

Email to test1 user

| col1           | col2 |
| Tes1           | 30   |
| test1          | 30   |
| Total of Test1 | 60   |