Question: 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

1 Expert Approved Answer
Step: 1 Unlock

Q1 Display Category ID Category Name the average listprice and the number of products for all catego... View full answer

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 Operating System Questions!