반응형 최신 값1 [MySQL] SubQuery로 정렬하여 최신 ROW 가져오기 SELECT * FROM _TABLE_ WHERE (ID, DATE) IN ( SELECT ID, MAX(DATE) FROM _TABLE_ GROUP BY ID) ORDER BY DATE DESC; SELECT * FROM _TABLE_ WHERE (ID, DATE) IN ( SELECT ID, MAX(DATE) FROM _TABLE_ GROUP BY ID) ORDER BY DATE DESC; 2020. 3. 17. 이전 1 다음 반응형