Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What's the wildest online purchase you've ever made?

Answered: 1 week ago

Question

Has time been designated in the schedule for collaboration?

Answered: 1 week ago