Question: Code example 5 - 1 SELECT VendorState, VendorCity, VendorName, COUNT ( * ) AS InvoiceQty, SUM ( InvoiceTotal ) AS InvoiceAvg FROM Invoices i JOIN

Code example 5-1
SELECT VendorState, VendorCity, VendorName, COUNT(*) AS InvoiceQty,
SUM(InvoiceTotal) AS InvoiceAvg
FROM Invoices i
JOIN Vendors v
ON i.VendorID = v.VendorID
WHERE VendorState <'e'
GROUP BY VendorState, VendorCity, VendorName
HAVING SUM(InvoiceTotal)>500
ORDER BY VendorState, VendorCity, VendorName;
The GROUPING SETS operator works like the ROLLUP and CUBE operators, but it...
a. excludes summary rows
b. doesnt add summary rows for specified groups
c. allows you to use additional sets of parentheses to create composite groups
d. only works with tables that have an even number of rows

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 Programming Questions!