이 문제는 보통 서브쿼리를 사용하여 풀고 있는 것 같다.
SELECT
MEMBER_ID
FROM
REST_REVIEW
GROUP BY MEMBER_ID
ORDER BY COUNT(*) DESC
LIMIT 1
SELECT
MEMBER_ID,
REVIEW_TEXT,
REVIEW_DATE
FROM
REST_REVIEW
WHERE
MEMBER_ID = (1번 서브 쿼리)
SELECT
MEMBER_NAME,
REVIEW_TEXT,
REVIEW_DATE
FROM
(2번 서브쿼리) AS A
JOIN
MEMBER_PROFILE B
ON
A.MEMBER_ID = B.MBMBER_ID
ORDER BY REVIEW_DATE ASC, REVIEW_TEXT ASC
SELECT
B.MEMBER_NAME,
A.REVIEW_TEXT,
DATE_FORMAT(A.REVIEW_DATE,'%Y-%m-%d') AS REVIEW_DATE
FROM
(SELECT
MEMBER_ID,
REVIEW_TEXT,
REVIEW_DATE
FROM
REST_REVIEW
WHERE MEMBER_ID = (SELECT
MEMBER_ID
FROM REST_REVIEW
GROUP BY MEMBER_ID
ORDER BY COUNT(*) DESC
LIMIT 1)
) AS A
JOIN
MEMBER_PROFILE B
ON
A.MEMBER_ID = B.MEMBER_ID
ORDER BY REVIEW_DATE ASC, REVIEW_TEXT ASC