Write a SELECT statement that returns a single value that re
Write a SELECT statement that returns a single value that represents the sum of the largest unpaid invoices submitted by each vendor. Use a derived table that returns MAX(InvoiceTotal) grouped by VendorID, filtering for invoices with a balanced due.
Solution
Select MAX(maxInvoiceTotal) from
(
Select VendorID,MAX(InvoiceTotal) as maxInvoiceTotal
from Invoice
where due>0
)
