Question: Using the tPurchaseltem table, write a query that retrieves the total purchase amount for each comination of PurchaseType and PurchaseDate, subtotals for each PurchaseType, and

Using the tPurchaseltem table, write a query that retrieves the total purchase amount for each comination of PurchaseType and PurchaseDate, subtotals for each PurchaseType, and the grand total. Hint: You will need use the Sum function with PurchaseAmt to calculate the total purchase amount for each grouping set. You will need 3 different groupings.
(PurchaseType, PurchaseDate): This grouping will provide the total purchase amount for each unique combination of PurchaseType and PurchaseDate.
(PurchaseType): This grouping will provide subtotals for each unique PurchaseType.
0: This grouping will provide the grand total of all purchases without any specific grouping.
columns in the purchase item table are purchaseID supplier, purchasetype, purchaseamount and purchasedate
Using the tPurchaseltem table, write a query that

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!