Can you show the product name and total order quantity of each product please?
select t1.product_name, sum ( t2.order_quantity ) from products as t1 join order_items as t2 on t1.product_id = t2.product_id group by t1.product_id
Could you add the product type codes to the table please?
select t1.product_name, sum ( t2.order_quantity ) ,t1.product_type_code from products as t1 join order_items as t2 on t1.product_id = t2.product_id group by t1.product_id
What is the average product price of all the products?
select avg ( product_price ) from products
Can you list the product names of all products with prices below the average product price?
select product_name from products where product_price < ( select avg ( product_price ) from products )
The product ids of all products whose prices are above the average product price are listed.
select product_name from products where product_price> ( select avg ( product_price ) from products )