You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12345 |
- SELECT SUM(invoice_max) AS sum_of_maximums
- FROM (SELECT vendor_id, MAX(invoice_total) AS invoice_max
- FROM invoices
- WHERE invoice_total - credit_total - payment_total > 0
- GROUP BY vendor_id) t
|