Question: Write the SQL queries that accomplish the following tasks in the ZAGI database: ExtE.1a Display the VendorID and VendorName for all vendors. ExtE.1b Display the

Write the SQL queries that accomplish the following tasks in the ZAGI database:

ExtE.1a Display the VendorID and VendorName for all vendors.

ExtE.1b Display the CustomerName and CustomerZip for all customers.

ExtE.1c Display the ProductID, ProductName, and ProductPrice for products with a ProductPrice of $100 or higher.

ExtE.1d Display the ProductID, ProductName, ProductPrice, and VendorName for all products. Sort the results by ProductID.

ExtE.1e Display the ProductID, ProductName, ProductPrice, VendorName, and CategoryName for all products. Sort the results by ProductID.

ExtE.1f Display the ProductID, ProductName, and ProductPrice for products in the category whose CategoryName value is Camping. Sort the results by ProductID.

ExtE.1g Display the TID, CustomerName, and TDate for sales transactions involving a customer buying a product whose ProductName is Dura Boot.

ExtE.1h Display the RegionID, RegionName, and number of stores in the region for all regions.

ExtE.1i For each product category, display the CategoryID, CategoryName, and average price of a product in the category

ExtE.1j For each product category, display the CategoryID and the total number of items purchased in the category.

ExtE.1k 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.

ExtE.1l Display the ProductID and ProductName of the cheapest product.

ExtE.1m Display the ProductID, ProductName, and VendorName for products whose price is below the average price of all products.

ExtE.1n Display the ProductID for the product that has been sold the most (i.e., that has been sold in the highest quantity.)

ExtE.1o Rewrite Query 29 using a JOIN statement (no nested queries).

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