I am working with sql and I would like to do the following. I have a table
| Name | Limit | Use |
|---|---|---|
| Person1 | 100 | 50 |
| Person1 | 200 | 200 |
| Person2 | 200 | 0 |
| Person3 | 100 | 100 |
| Person3 | 200 | 50 |
| Person3 | 300 | 50 |
And I want as a result
| Name | Limit | Use |
|---|---|---|
| Person1 | 300 | 250 |
| Person2 | 200 | 0 |
| Person3 | 600 | 200 |
This means I want to create a table that has only one row for each distinct name and aggregates the rows for each different name by summing them. Would be happy for any help!