Need to do a group by on department column and do the sum of total column and the out put should be placed in the next row

Hi All,

I am not able to get the expected output.
I have a datatable with all the rows now i need to do the group by on department column and get the sum of total column for that group by and the output should be placed in the next row .Please find the below screenshot for reference.Can anyone please help to solve the above problem

image

anyone can please help me

did u get my query i want the output as per the screenshot

Hi All i am attaching the input file and the required output file.
input.xls (29 KB)
output.xls (30.5 KB)

ANY SOLUTIONS GUYSS PLEASE