Question: E5.1 Write the SQL queries that accomplish the following tasks in the ZAGI Retail Company Sales Department Database: E5.1.18 Display the TID and the total

E5.1 Write the SQL queries that accomplish the following tasks in the ZAGI Retail Company Sales Department Database:

E5.1.18 Display the TID and the total number of items (of all products) sold within the transaction for all sales transactions whose total number of items (of all products) sold within the transaction is greater than five.

E5.1.19 For each vendor whose product sales exceed $700, display the VendorID, VendorName, and total amount of sales in dollars. Display the total amount of sales as TotalSales.

E5.1.20 Display the ProductID, ProductName, and ProductPrice of the cheapest product.

E5.1.21 Display the ProductID, ProductName, and VendorName for products whose price is below the average price of all products.

E5.1.22 Display the ProductID and ProductName of the product for the products whose total quantity sold in all transactions is greater than 2. Sort the results by ProductID.

E5.1.23 Display the ProductID for the product that has been sold the most within all transactions (i.e., that has been sold in the highest total quantity across all transactions)."

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 General Management Questions!