Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQL statement to display Category ID, Category Name, the average list_price, and the number of products for all categories in the product_categories table. For

Write SQL statement to display Category ID, Category Name, the average list_price, and the number of products for all categories in the product_categories table.
For categories in product_categories that do not have any matching rows in products, the average price and the number of products are shown as 0.

Round the average price to two decimal places.

Sort the result by category ID.

Q.2 For all customer, display customer number, customer full name, and the total number of orders issued by the customer. 

  • If the customer does not have any orders, the result shows 0.
  • Display only customers whose customer name starts with 'W' and contains 'oo'.
  • Sort the result first by the number of orders and then by customer ID.

Q.3 Write  SQL statement to display the number of different products and the total quantity of all products for all warehouses.
Sort the resut according the value of quantity of all products.

Q.4 Write  SQL statement to display the number of warehouses for each country.
Display country name and the number of warehoses in your result.
Sort the result by the country name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Q1 Display Category ID Category Name the average listprice and the number of products for all catego... 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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Operating System questions

Question

6.66 Find zo such that P(-zo

Answered: 1 week ago

Question

Propose a reasonable mechanism for the following reaction. OH

Answered: 1 week ago

Question

Why is system availability an advantage in a distributed database?

Answered: 1 week ago

Question

What are the characteristics of OLTP systems?

Answered: 1 week ago