CON ID 의 가장 최근 날짜만 불러오고 싶습니다.
ex) GYW0001 // 2018-01-06 14:56
CON ID | CLEAN |
GYW0001 | 2018-01-01 14:56 |
GYW0001 | 2018-01-02 14:56 |
GYW0001 | 2018-01-03 14:56 |
GYW0001 | 2018-01-04 14:56 |
GYW0001 | 2018-01-05 14:56 |
GYW0001 | 2018-01-06 14:56 |
GYW0002 | 2018-01-01 14:56 |
GYW0002 | 2018-01-02 14:56 |
GYW0002 | 2018-01-03 14:56 |
GYW0002 | 2018-01-04 14:56 |
GYW0002 | 2018-01-05 14:56 |
GYW0002 | 2018-01-06 14:56 |
GYW0002 | 2018-01-07 14:56 |
GYW0002 | 2018-01-08 14:56 |
GYW0002 | 2018-01-09 14:56 |
Comment 1
-
이리
2019.01.28 09:17
SELECT [CON ID], MAX(CLEAN) AS CLEAN
FROM 테이블
GROUP BY [CON ID]