SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_
ID: 3656451 • Letter: S
Question
SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_total - credit_total) AS balance_due FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total > (SELECT AVG(invoice_total - payment_total - credit_total) FROM invoices) GROUP BY vendor_name ORDER BY balance_due DESC (Please refer to the code example above.) When this query is executed, the rows will be sorted by Answer a. balance_due in descending sequence b. invoice_id c. vendor_idExplanation / Answer
b. invoice_id
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.