SQL 특정 기간 중복 조회하기
Question : http://www.gurubee.net/article/50384More questions & Answer: http://www.gurubee.net/article/45391 123456789101112131415161718192021SELECT COUNT(*) FROM TABLE_NAME WHERE 조건1 AND ( ( ST_DT >= DATE_FORMAT(#{stDt},'%Y%m%d') AND ST_DT DATE_FORMAT(#{endDt},'%Y%m%d') ) OR ( END_DT >=DATE_FORMAT(#{stDt},'%Y%m%d') AND END_DT DATE_FORMAT(#{endDt},'%Y%m%d') ) OR ( ST_DT DATE_FORMAT(#{stDt},'%Y%m..