I have input as below:
I want output as below:
I tried using group, rollup functions to achieve it but not getting the desired result. If anyon