How to implement it in interface using grid?

Hi Team,

Can anyone please help me how can I implement the case given below in interface using grid:

Col A Count Col B
a 1
a 2
a 1
Total a 4
b 1
b 2
Total b 3

It should display the count of col A for each category. Any other suggestions might be helpful. 

  Discussion posts and replies are publicly visible