안녕하세요
리눅스에 mysql 3.23 을 사용하고 있습니다.
다음 SQL에서 구문오류가 발생하고 있습니다.
select log_date 'log_date 순증',
vendor_code,
telecom,
sum ( case when reg_state = 'R' then 1
when reg_state = 'U' then -1
else 0
end ) as '합계'
from qme.user_log_tbl
where log_date between '20070901 000000' and '20070901 235959'
and vendor_code = 'E01'
group by vendor_code, telecom
어디서 오류가 발생하는지 잘모르겠습니다.
아시는분계시면 도움 부탁드립니다.
감사합니다.
|