How to compare the present column data with previous column data and create the new datatable

Hi,

I have sample data like below. I need to compare the column “C” values present and next row values and need to sum the column A, D and E.
Input:

A B C D E
2 10-08-2021 10 1 1
3 10-08-2021 10 1 2
4 11-08-2021 6 1 3
1 11-08-2021 6 0 1

Required Output:

A B C D E
5 10-08-2021 10 2 3
5 11-08-2021 6 12 4

Could some once help me on this.

Hi @Chandana_M,

You can do this by doing group by column C and running aggregate function(sum) on other columns.

Regards
Sonali

Please find the solution here,