How do I order numbers in a table by group?

For example

As is

GroupA  -3

GroupA 5

GroupA 0

GroupB 4

GroupB 3

GroupB 7

 

 

To do

GroupA -3 1

GroupA 5 3

GroupA 0 2

GroupB 4 2

GroupB 3 1

GroupB 7 3

 

 

Hi,

you need to loop this.

Group loop Start, Rank node, Loop end.

Best, Iris 

Thank u!