select p.product_id ,product_name ,round(sum(price * coalesce(quantity,0)),2) as total_sales from products_underline p join sales_underline s on p.product_id = s.product_id where substring(sale_month,1,7) between "2024-01" and "2024-06" group by p.product_id ,product_name order by product_id



京公网安备 11010502036488号