https://school.programmers.co.kr/learn/courses/30/lessons/131118
정답
--식당 ID, 식당 이름, 음식 종류, 즐겨찾기수, 주소, 리뷰 평균 점수
SELECT A.REST_ID,A.REST_NAME,A.FOOD_TYPE,A.FAVORITES,A.ADDRESS,ROUND(AVG(B.REVIEW_SCORE), 2) SCORE
FROM REST_INFO A
INNER JOIN REST_REVIEW B
ON A.REST_ID = B.REST_ID
WHERE A.ADDRESS LIKE '서울%'
GROUP BY A.REST_ID,A.REST_NAME,A.FOOD_TYPE,A.FAVORITES,A.ADDRESS
ORDER BY SCORE DESC ,A.FAVORITES DESC
SELECT A.REST_ID,A.REST_NAME,A.FOOD_TYPE,A.FAVORITES,A.ADDRESS,B.REVIEW_SCORE
FROM REST_INFO A
INNER JOIN REST_REVIEW B
ON A.REST_ID = B.REST_ID
WHERE A.ADDRESS LIKE '서울%'