Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

Students also viewed these Databases questions

Question

How do you feel when they are talking with you?

Answered: 1 week ago

Question

=+How might you explain this phenomenon?

Answered: 1 week ago