Help please make a request. I need to get the sum of the prices of all values where id does not repeat
Let's say
id|price|status 1 | 2 | 1 2 | 3 | 1 2 | 3 | 1 3 | 3 | 1 4 | 3 | 4 As a result, you should get the sum of prices of statuses with unique id.
status|summ| 1 | 8 | 4 | 3 | I do GROUP BY status. But I can not write next GROUP BY id. Can somehow through DISTINCT possible?