SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN
ID: 3656789 • Letter: S
Question
SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN (SELECT vendor_id, AVG(invoice_total) AS average_invoice FROM invoices GROUP BY vendor_id HAVING AVG(invoice_total) > 100 ORDER BY average_invoice DESC) ia ON i.vendor_id = ia.vendor_id GROUP BY i.vendor_id ORDER BY largest_invoice DESC (Please refer to code example above.) When this query is executed, each row in the result table will show Answer a. the average invoice total related to that row b. the largest invoice total related to that row, but only if itExplanation / Answer
c. the largest invoice total related to that row
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.