Question: Code example 7 - 2 SELECT i . vendor _ id , MAX ( i . invoice _ total ) AS largest _ invoice FROM

Code example 7-2
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) ia
ON i.vendor_id = ia.vendor_id
GROUP BY i.vendor_id
ORDER BY largest_invoice DESC
(Refer to code example 7-2.) When this query is executed, there will be one row...
Group of answer choices
for each vendor
for each vendor with an average invoice total thats greater than 100
for each vendor with a maximum invoice total thats greater than 100
for each invoice with an invoice total thats greater than the average invoice total for the vendor and also greater than 100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!