Let's say I have this table:
| sellerid | buyerid | price |
|---|---|---|
| abc | xyz | 100.00 |
| abc | xyz | 500.00 |
| ikj | abc | 200.00 |
| ikj | abc | 300.00 |
And I need to get the sum of price for each id (sellerid and buyerid):
| id | total |
|---|---|
| abc | 11,000.00 |
| xyz | 600.00 |
| ikj | 500.00 |
I'm struggling with the group by part, I can get it to give me the total but then the id is null.
Any help would be appreciated, thanks.