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.
123456 |
- SELECT SUM(max_invoice_total) AS total_max
- FROM (SELECT vendor_id, MAX(invoice_total) AS max_invoice_total
- FROM invoices
- WHERE invoice_total - payment_total - credit_total > 0
- GROUP BY vendor_id) t;
-
|