Question: Code example 6 - 2 WITH Top 5 AS ( SELECT TOP 5 VendorID, AVG ( InvoiceTotal ) AS AvgInvoice FROM Invoices GROUP BY VendorID
Code example
WITH Top AS
SELECT TOP VendorID, AVGInvoiceTotal AS AvgInvoice
FROM Invoices
GROUP BY VendorID
ORDER BY AvgInvoice DESC
SELECT Invoices.VendorID, MAXInvoicesInvoiceTotal AS LargestInvoice
FROM Invoices JOIN Top
ON Invoices.VendorID TopVendorID
GROUP BY Invoices.VendorID
ORDER BY LargestInvoice DESC;
Please refer to code example How many rows will there be in the result table when this query is executed?
Group of answer choices
Unknown
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
