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
Step: 1
Q1 Display Category ID Category Name the average listprice and the number of products for all catego...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started