By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | batch_total_invoice_amount |
---|---|
4 | null |
3 | null |
2 | 333 |
1 | 300 |
1 | 300 |
null | null |
id | SUM(cb.invoice_amount) |
---|---|
4 | null |
3 | null |
2 | 333 |
1 | 600 |
null | null |
batch_id | sum(invoice_amount) |
---|---|
5 | 123 |
3 | null |
2 | 333 |
1 | 300 |
null | 456 |