By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| order_num | total_price |
|---|---|
| 11077 | 26 |
| 11077 | 31 |
| 11077 | 30 |
| 11077 | 17 |
| 10962 | 792 |
| 10962 | 324 |
| 10962 | 656 |
| order_num | SUM(total_price) |
|---|---|
| 10962 | 1772 |
| 11077 | 104 |
| order_num | total_price |
|---|---|
| 11077 | 26 |
| 11077 | 31 |
| 11077 | 30 |
| 11077 | 17 |
| 10962 | 792 |
| 10962 | 324 |
| 10962 | 656 |
| order_num | SUM(total_price) |
|---|---|
| 10962 | 1772 |
| 11077 | 104 |