-- 코드를 입력하세요 SELECT A.REST_ID, B.REST_NAME, B.FOOD_TYPE, B.FAVORITES, B.ADDRESS, ROUND(AVG(REVIEW_SCORE), 2) AS SCORE FROM REST_REVIEW A INNER JOIN (SELECT REST_ID, REST_NAME, FOOD_TYPE, FAVORITES, ADDRESS FROM REST_INFO WHERE SUBSTR(ADDRESS, 1, 2) = '서울') B ON A.REST_ID = B.REST_ID GROUP BY 1 ORDER BY SCORE DESC , B.FAVORITES DESC