Programmers/프로그래머스-그룹별 조건에 맞는 식당 목록 출력하기-MySQL

cosmos·2022년 11월 6일
0
post-thumbnail
post-custom-banner

문제

쿼리

SELECT A.MEMBER_NAME, B.REVIEW_TEXT, DATE_FORMAT(B.REVIEW_DATE, '%Y-%m-%d') AS REVIEW_DATE
FROM MEMBER_PROFILE AS A
JOIN REST_REVIEW AS B ON A.MEMBER_ID = B.MEMBER_ID
WHERE A.MEMBER_ID = (
    SELECT MEMBER_ID
    FROM REST_REVIEW
    GROUP BY MEMBER_ID
    ORDER BY COUNT(MEMBER_ID) DESC
    LIMIT 1
)
ORDER BY B.REVIEW_DATE, B.REVIEW_TEXT

결과

출처 & 깃허브

프로그래머스
github

post-custom-banner

0개의 댓글