[프로그래머스 | SQL 고득점 키트 | join] 5월 식품들의 총매출 조회하기

-- 코드를 입력하세요
SELECT b.PRODUCT_ID, a.PRODUCT_NAME, SUM(b.AMOUNT*a.PRICE) AS TOTAL_SALES
FROM FOOD_PRODUCT a
JOIN FOOD_ORDER b
ON a.PRODUCT_ID = b.PRODUCT_ID
AND b.PRODUCE_DATE LIKE '%2022-05%'
GROUP BY a.PRODUCT_ID, a.PRODUCT_NAME
ORDER BY SUM(b.AMOUNT*a.PRICE) DESC, PRODUCT_ID ASC