select p.product_id ,product_name , sum(quantity*price) total_sales
from products_underline p
left join (
select product_id,sum(quantity) quantity
from sales_underline
where sale_month between '2024-01' and '2024-06'
group by 1 )c
on p.product_id = c.product_id
group by 1,2