How many products have a price higher than the average?
select count ( * ) from products where product_price > ( select avg ( product_price ) from products )
Can you give me the product names for these?
select product_name from products where product_price > ( select avg ( product_price ) from products )
And how many products have a price lower than the average?
select count ( * ) from products where product_price < ( select avg ( product_price ) from products )
May I have their product names please?
select distinct product_name from products where product_price < ( select avg ( product_price ) from products )