SQL/ORACLE
[ORACLE] LEAST함수를 이용한 SQL문
nineDeveloper
2014. 2. 12. 21:34
728x90
반응형
select FN_GET_STATUS(status_g) as 구분, sum(decode(least(to_char(reg_dt, 'yyyymmdd'), 20031211 ), to_char(reg_dt, 'yyyymmdd'), 1, 0)) as "12월11일" from crss_status_his group by status_g
LEAST : 적어도..
728x90
반응형