1. code: SELECT II.INGREDIENT_TYPE, SUM(FH.TOTAL_ORDER)FROM FIRST_HALF FHJOIN ICECREAM_INFO II ON FH.FLAVOR = II.FLAVORGROUP BY INGREDIENT_TYPEORDER BY INGREDIENT_TYPE DESC 2. code:SELECT ORDER_ID, PRODUCT_ID, OUT_DATEfrom FOOD_ORDERwhere OUT_DATE like "%2022-05-01%" Answer: SELECT ORDER_ID, PRODUCT_ID, DATE_FORMAT(OUT_DATE, '%Y-%m-%d') AS OUT_DATE, CASE WHEN OUT_DATE IS NULL THEN ..