I Declared a Two-Dimensional array, people(3,20)
In this array there are 20 rows( second dimension) and 3 columns( first
dimension), what i mean is: below you can see the statuses of this array's
first dimension

I want to group the rows with the same value( at the "name" column) which
are at the array's first dimension's zeroth value.And, to have the sum of
values of the "quantity" column and in this way,create a new array.

Briefly,what i want to do is, to exactly use the "GROUP-BY" functionality at
T-SQL. For example if this array was in a database,we could turn with
recordset like this:
SELECT name, SUM ( quantity), FROM (people) GROUP BY name

There is an alternative way .i can put the "people" array in a table and run
the process from there.
But i wonder how i can solve this problem in a better way.
Waiting for your suggestions...