desc와 asc를 헷갈리지 말자. 글을 잘읽도록 하자
-- 코드를 입력하세요 SELECT P.PRODUCT_CODE, SUM(P.PRICE * O.SALES_AMOUNT) AS SALES FROM PRODUCT AS P JOIN OFFLINE_SALE AS O ON O.PRODUCT_ID= P.PRODUCT_ID GROUP BY P.PRODUCT_CODE ORDER BY SALES DESC, P.PRODUCT_CODE