Here is my query:
select avg(p2.price), p2.brand_name, count(distinct p2.product_id) count_of_products from product p2 group by p2.brand_name having count(di