https://school.programmers.co.kr/learn/challenges?page=1&languages=mysql&order=recent
select product_id, product_name, price * amount as total_sales
from food_product
inner join(
select product_id as product_id1, sum(amount) as amount
from food_order
where year(produce_date) = 2022 and month(produce_date) = 5
group by product_id1
) join1 on food_product.product_id = product_id1
order by total_sales desc, product_id asc