select a.product_id,a.product_name,case when b.total_amount is null then 0.00 else ROUND(b.total_amount,2) end q2_2024_sales_total,rank() over(partition by a.category order by b.total_amount desc) category_rank,c.supplier_name from product_info a left join (select product_id,sum(total_amount) total_amount from order_info where MONTH(order_date) = 4 or MONTH(order_date) = 5 or MONTH(order_date) = 6 group by product_id)  b on a.product_id = b.product_id 
left join supplier_info c on a.product_id = c.product_id 
order by product_id