SELECT A.PRODUCT_ID,
A.PRODUCT_NAME,
SUM(B.AMOUNT * A.PRICE) AS TOTAL_SALES
FROM FOOD_PRODUCT A LEFT JOIN FOOD_ORDER B ON A.PRODUCT_ID = B.PRODUCT_ID
WHERE B.PRODUCT_DATE BETWEEN "2022-05-01" AND "2022-05-31"
GROUP BY A.PRODUCT_ID,
A.PRODUCT_DATE,
A.PRICE
ORDER BY TOTAL_SALES DESC, A.PRODUCT_ID